search for: control_singlestep

Displaying 11 results from an estimated 11 matches for "control_singlestep".

2020 Feb 07
0
[RFC PATCH v7 25/78] KVM: x86: add .control_singlestep()
From: Nicu?or C??u <ncitu at bitdefender.com> This function is needed for KVMI_VCPU_CONTROL_SINGLESTEP and KVMI_EVENT_SINGLESTEP. Signed-off-by: Nicu?or C??u <ncitu at bitdefender.com> Signed-off-by: Adalbert Laz?r <alazar at bitdefender.com> --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/vmx/vmx.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/arc...
2020 Jul 21
0
[PATCH v9 26/84] KVM: x86: add .control_singlestep()
From: Nicu?or C??u <ncitu at bitdefender.com> This function is needed for KVMI_VCPU_CONTROL_SINGLESTEP. Signed-off-by: Nicu?or C??u <ncitu at bitdefender.com> Signed-off-by: Adalbert Laz?r <alazar at bitdefender.com> --- arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/vmx/vmx.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/arch/x86/include/asm/kvm_host...
2020 Feb 07
0
[RFC PATCH v7 74/78] KVM: introspection: add KVMI_VCPU_CONTROL_SINGLESTEP
...virt/kvm/kvmi.rst +++ b/Documentation/virt/kvm/kvmi.rst @@ -930,6 +930,37 @@ In order to 'forget' an address, all the access bits ('rwx') must be set. * -KVM_EINVAL - the message size is invalid * -KVM_ENOMEM - not enough memory to add the page tracking structures +20. KVMI_VCPU_CONTROL_SINGLESTEP +-------------------------------- + +:Architectures: x86 (vmx) +:Versions: >= 1 +:Parameters: + +:: + + struct kvmi_vcpu_control_singlestep { + __u8 enable; + __u8 padding[7]; + }; + +:Returns: + +:: + + struct kvmi_error_code + +Enables/disables singlestep. + +The introspection tool can use *...
2020 Jul 22
0
[RFC PATCH v1 01/34] KVM: x86: export .get_vmfunc_status()
...arch/x86/include/asm/kvm_host.h index d96bf0e15ea2..ab6989745f9c 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -1300,6 +1300,7 @@ struct kvm_x86_ops { bool (*spt_fault)(struct kvm_vcpu *vcpu); bool (*gpt_translation_fault)(struct kvm_vcpu *vcpu); void (*control_singlestep)(struct kvm_vcpu *vcpu, bool enable); + bool (*get_vmfunc_status)(void); }; struct kvm_x86_nested_ops { diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 8c9ccd1ba0f0..ec4396d5f36f 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -7992,6 +7992,11 @@ static vo...
2020 Jul 22
0
[RFC PATCH v1 02/34] KVM: x86: export .get_eptp_switching_status()
...f --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index ab6989745f9c..5eb26135e81b 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -1301,6 +1301,7 @@ struct kvm_x86_ops { bool (*gpt_translation_fault)(struct kvm_vcpu *vcpu); void (*control_singlestep)(struct kvm_vcpu *vcpu, bool enable); bool (*get_vmfunc_status)(void); + bool (*get_eptp_switching_status)(void); }; struct kvm_x86_nested_ops { @@ -1422,6 +1423,7 @@ extern u64 kvm_max_tsc_scaling_ratio; extern u64 kvm_default_tsc_scaling_ratio; extern u64 kvm_mce_cap_supported; +exter...
2020 Feb 07
0
[RFC PATCH v7 75/78] KVM: introspection: add KVMI_EVENT_SINGLESTEP
..., rpl_size); +} + static int do_vcpu0_command(struct kvm_vm *vm, int cmd_id, struct kvmi_msg_hdr *req, size_t req_size, void *rpl, size_t rpl_size) @@ -1681,24 +1700,67 @@ static void test_event_pf(struct kvm_vm *vm) test_pf(vm, cbk_test_event_pf); } -static void test_cmd_vcpu_control_singlestep(struct kvm_vm *vm) +static void control_singlestep(struct kvm_vm *vm, bool enable) { struct { struct kvmi_msg_hdr hdr; struct kvmi_vcpu_hdr vcpu_hdr; struct kvmi_vcpu_control_singlestep cmd; } req = {}; + int r; + + req.cmd.enable = enable; + r = __do_vcpu0_command(vm, KVMI_VCPU_CONTR...
2020 Jul 22
0
[RFC PATCH v1 12/34] KVM: introspection: extend struct kvmi_features with the EPT views status support
...vm/kvmi.c index 7b3b64d27d18..25c1f8f2e221 100644 --- a/arch/x86/kvm/kvmi.c +++ b/arch/x86/kvm/kvmi.c @@ -1356,6 +1356,10 @@ static void kvmi_track_flush_slot(struct kvm *kvm, struct kvm_memory_slot *slot, void kvmi_arch_features(struct kvmi_features *feat) { feat->singlestep = !!kvm_x86_ops.control_singlestep; + feat->vmfunc = kvm_x86_ops.get_vmfunc_status && + kvm_x86_ops.get_vmfunc_status(); + feat->eptp = kvm_x86_ops.get_eptp_switching_status && + kvm_x86_ops.get_eptp_switching_status(); } bool kvmi_arch_start_singlestep(struct kvm_vcpu *vcpu) diff --git a/tools/testing/...
2020 Feb 07
0
[RFC PATCH v7 73/78] KVM: introspection: extend KVMI_GET_VERSION with struct kvmi_features
...ndex 4e8b8e0a2961..5cf266d13375 100644 --- a/arch/x86/kvm/kvmi.c +++ b/arch/x86/kvm/kvmi.c @@ -1100,6 +1100,11 @@ bool kvmi_arch_pf_event(struct kvm_vcpu *vcpu, gpa_t gpa, gva_t gva, return ret; } +void kvmi_arch_features(struct kvmi_features *feat) +{ + feat->singlestep = !!kvm_x86_ops->control_singlestep; +} + bool kvmi_arch_pf_of_interest(struct kvm_vcpu *vcpu) { return kvm_x86_ops->spt_fault(vcpu) && diff --git a/include/uapi/linux/kvmi.h b/include/uapi/linux/kvmi.h index c74ded097efa..7cd41a815967 100644 --- a/include/uapi/linux/kvmi.h +++ b/include/uapi/linux/kvmi.h @@ -91,6 +91,...
2020 Jul 22
34
[RFC PATCH v1 00/34] VM introspection - EPT Views and Virtualization Exceptions
This patch series is based on the VM introspection patches (https://lore.kernel.org/kvm/20200721210922.7646-1-alazar at bitdefender.com/), extending the introspection API with EPT Views and Virtualization Exceptions (#VE) support. The purpose of this series is to get an initial feedback and to see if we are on the right track, especially because the changes made to add the EPT views are not small
2020 Feb 07
78
[RFC PATCH v7 00/78] VM introspection
...uot;only" the basic introspection capabilities - add a x86_64 test in tools/testing/selftests/kvm [Paolo] - simplify the requests/replies handling [Paolo] - add a new ioctl (PREHOOK) to notify the introspection tool to unhook [Paolo, Sean] - add two new commands KVMI_VCPU_CONTROL_SINGLESTEP and KVMI_VCPU_TRANSLATE_GVA [Mathieu] - restore the status of MSRs, CR3, descriptors access interception and prevent conflicts with userspace [Sean] - other fixes for allmost all the issues pointed in the previous code review [Sean, Paolo] Adalbert Laz?r (19): sched/swa...
2020 Jul 21
87
[PATCH v9 00/84] VM introspection
...e exits KVM: x86: add .desc_intercepted() KVM: x86: export .msr_write_intercepted() KVM: x86: use MSR_TYPE_R, MSR_TYPE_W and MSR_TYPE_RW with AMD KVM: svm: pass struct kvm_vcpu to set_msr_interception() KVM: vmx: pass struct kvm_vcpu to the intercept msr related functions KVM: x86: add .control_singlestep() KVM: x86: export kvm_arch_vcpu_set_guest_debug() KVM: x86: export kvm_inject_pending_exception() KVM: x86: export kvm_vcpu_ioctl_x86_get_xsave() KVM: introspection: add cleanup support for vCPUs KVM: introspection: restore the state of #BP interception on unhook KVM: introspection: re...