KVM: selftests: Add helpers to make Xen-style VMCALL/VMMCALL hypercalls
authorSean Christopherson <seanjc@google.com>
Sat, 4 Feb 2023 02:41:49 +0000 (02:41 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Mar 2023 14:20:08 +0000 (10:20 -0400)
commitc0c76d99939cb4ac28cbc5ce542cff2b9e1e1b02
treeb2621f428d853da0561fc7f315424afc9b0f25b1
parent4009e0bb7b83d967a14e108d271f003b378f9af9
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>
tools/testing/selftests/kvm/include/x86_64/processor.h
tools/testing/selftests/kvm/lib/x86_64/processor.c
tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c