search for: test_cmd_vcpu_get_xsave

Displaying 6 results from an estimated 6 matches for "test_cmd_vcpu_get_xsave".

2020 Jul 21
0
[PATCH v9 71/84] KVM: introspection: add KVMI_VCPU_SET_XSAVE
...vm_xsave rpl; int r; r = do_vcpu0_command(vm, KVMI_VCPU_GET_XSAVE, &req.hdr, sizeof(req), - &rpl, sizeof(rpl)); + rpl, sizeof(*rpl)); TEST_ASSERT(r == 0, "KVMI_VCPU_GET_XSAVE failed with error %d (%s)\n", -r, kvm_strerror(-r)); } -static void test_cmd_vcpu_get_xsave(struct kvm_vm *vm) +static void cmd_vcpu_set_xsave(struct kvm_vm *vm, struct kvm_xsave *rpl) +{ + struct { + struct kvmi_msg_hdr hdr; + struct kvmi_vcpu_hdr vcpu_hdr; + struct kvm_xsave xsave; + } req = {}; + int r; + + memcpy(&req.xsave, rpl, sizeof(*rpl)); + + r = do_vcpu0_command(vm, KVMI...
2020 Jul 21
0
[PATCH v9 70/84] KVM: introspection: add KVMI_VCPU_GET_XSAVE
...hdr; + } req = {}; + struct kvm_xsave rpl; + int r; + + r = do_vcpu0_command(vm, KVMI_VCPU_GET_XSAVE, &req.hdr, sizeof(req), + &rpl, sizeof(rpl)); + TEST_ASSERT(r == 0, + "KVMI_VCPU_GET_XSAVE failed with error %d (%s)\n", + -r, kvm_strerror(-r)); +} + +static void test_cmd_vcpu_get_xsave(struct kvm_vm *vm) +{ + struct kvm_cpuid_entry2 *entry; + + entry = kvm_get_supported_cpuid_entry(1); + if (!(entry->ecx & X86_FEATURE_XSAVE)) { + print_skip("XSAVE not supported, ecx 0x%x", entry->ecx); + return; + } + + cmd_vcpu_get_xsave(vm); +} + static void test_introspe...
2020 Feb 07
0
[RFC PATCH v7 65/78] KVM: introspection: add KVMI_VCPU_GET_XSAVE
...ests/kvm/x86_64/kvmi_test.c index 299f4d29d0d6..638491f33138 100644 --- a/tools/testing/selftests/kvm/x86_64/kvmi_test.c +++ b/tools/testing/selftests/kvm/x86_64/kvmi_test.c @@ -1322,6 +1322,26 @@ static void test_event_xsetbv(struct kvm_vm *vm) disable_vcpu_event(vm, event_id); } +static void test_cmd_vcpu_get_xsave(struct kvm_vm *vm) +{ + struct kvm_cpuid_entry2 *entry; + struct { + struct kvmi_msg_hdr hdr; + struct kvmi_vcpu_hdr vcpu_hdr; + } req = {}; + struct kvm_xsave rpl; + + entry = kvm_get_supported_cpuid_entry(1); + if (!(entry->ecx & X86_FEATURE_XSAVE)) { + DEBUG("XSAVE is not supporte...
2020 Feb 07
0
[RFC PATCH v7 69/78] KVM: introspection: add KVMI_VCPU_CONTROL_MSR and KVMI_EVENT_MSR
...ASSERT(msr_data == ev.msr.old_value, + "Failed to block MSR 0x%x update, value 0x%x, expected 0x%x", + msr, msr_data, ev.msr.old_value); +} + static void test_introspection(struct kvm_vm *vm) { setup_socket(); @@ -1447,6 +1548,7 @@ static void test_introspection(struct kvm_vm *vm) test_cmd_vcpu_get_xsave(vm); test_cmd_vcpu_get_mtrr_type(vm); test_event_descriptor(vm); + test_cmd_vcpu_control_msr(vm); unhook_introspection(vm); } diff --git a/virt/kvm/introspection/kvmi_int.h b/virt/kvm/introspection/kvmi_int.h index 6d2c09a12c49..33544dd9dce5 100644 --- a/virt/kvm/introspection/kvmi_int.h +...
2020 Feb 07
78
[RFC PATCH v7 00/78] VM introspection
The KVM introspection subsystem provides a facility for applications running on the host or in a separate VM, to control the execution of other VMs (pause, resume, shutdown), query the state of the vCPUs (GPRs, MSRs etc.), alter the page access bits in the shadow page tables (only for the hardware backed ones, eg. Intel's EPT) and receive notifications when events of interest have taken place
2020 Jul 21
87
[PATCH v9 00/84] VM introspection
The KVM introspection subsystem provides a facility for applications running on the host or in a separate VM, to control the execution of other VMs (pause, resume, shutdown), query the state of the vCPUs (GPRs, MSRs etc.), alter the page access bits in the shadow page tables (only for the hardware backed ones, eg. Intel's EPT) and receive notifications when events of interest have taken place