diff options
author | Sean Christopherson <seanjc@google.com> | 2023-02-04 02:41:49 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-03-14 10:20:08 -0400 |
commit | c0c76d99939cb4ac28cbc5ce542cff2b9e1e1b02 (patch) | |
tree | b2621f428d853da0561fc7f315424afc9b0f25b1 /tools/testing/selftests/kvm/include/x86_64/processor.h | |
parent | 4009e0bb7b83d967a14e108d271f003b378f9af9 (diff) | |
download | linux-stable-c0c76d99939cb4ac28cbc5ce542cff2b9e1e1b02.tar.gz linux-stable-c0c76d99939cb4ac28cbc5ce542cff2b9e1e1b02.tar.bz2 linux-stable-c0c76d99939cb4ac28cbc5ce542cff2b9e1e1b02.zip |
KVM: selftests: Add helpers to make Xen-style VMCALL/VMMCALL hypercalls
Add wrappers to do hypercalls using VMCALL/VMMCALL and Xen's register ABI
(as opposed to full Xen-style hypercalls through a hypervisor provided
page). Using the common helpers dedups a pile of code, and uses the
native hypercall instruction when running on AMD.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230204024151.1373296-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/include/x86_64/processor.h')
-rw-r--r-- | tools/testing/selftests/kvm/include/x86_64/processor.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h index 53ffa43c90db..90387ddcb2a9 100644 --- a/tools/testing/selftests/kvm/include/x86_64/processor.h +++ b/tools/testing/selftests/kvm/include/x86_64/processor.h @@ -1063,6 +1063,8 @@ uint64_t *vm_get_page_table_entry(struct kvm_vm *vm, uint64_t vaddr); uint64_t kvm_hypercall(uint64_t nr, uint64_t a0, uint64_t a1, uint64_t a2, uint64_t a3); +uint64_t __xen_hypercall(uint64_t nr, uint64_t a0, void *a1); +void xen_hypercall(uint64_t nr, uint64_t a0, void *a1); void __vm_xsave_require_permission(int bit, const char *name); |