On Tue, Apr 22, 2025, Zack Rusin wrote: > Add a testcase to exercise KVM_CAP_X86_VMWARE_HYPERCALL and validate > that KVM exits to userspace on hypercalls and registers are correctly > preserved. > > Signed-off-by: Zack Rusin <[email protected]> > Cc: Doug Covelli <[email protected]> > Cc: Paolo Bonzini <[email protected]> > Cc: Shuah Khan <[email protected]> > Cc: Sean Christopherson <[email protected]> > Cc: Namhyung Kim <[email protected]> > Cc: Joel Stanley <[email protected]> > Cc: Zack Rusin <[email protected]> > Cc: Isaku Yamahata <[email protected]> > Cc: Arnaldo Carvalho de Melo <[email protected]> > Cc: [email protected] > Cc: [email protected] > Cc: [email protected] > --- > tools/include/uapi/linux/kvm.h | 3 + > tools/testing/selftests/kvm/Makefile.kvm | 1 + > .../selftests/kvm/x86/vmware_hypercall_test.c | 121 ++++++++++++++++++ > 3 files changed, 125 insertions(+) > create mode 100644 tools/testing/selftests/kvm/x86/vmware_hypercall_test.c > > diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h > index 502ea63b5d2e..3b3ad1827245 100644 > --- a/tools/include/uapi/linux/kvm.h > +++ b/tools/include/uapi/linux/kvm.h > @@ -933,6 +933,9 @@ struct kvm_enable_cap { > #define KVM_CAP_PRE_FAULT_MEMORY 236 > #define KVM_CAP_X86_APIC_BUS_CYCLES_NS 237 > #define KVM_CAP_X86_GUEST_MODE 238 > +#define KVM_CAP_X86_VMWARE_BACKDOOR 239 > +#define KVM_CAP_X86_VMWARE_HYPERCALL 240 > +#define KVM_CAP_X86_VMWARE_NESTED_BACKDOOR_L0 241
Can I bribe/convince you to port KVM-Unit-Tests' x86/vmware_backdoors.c to a KVM selftest that verifies KVM's behavior for the various combination of module param and capability values?

