[LTP] [PATCH 00/10] Basic KVM test for Intel VMX
Martin Doucha
mdoucha@suse.cz
Tue Jan 21 17:44:14 CET 2025
Since we already have some functional and CVE tests for AMD SVM, we should
also add tests for Intel VMX. This patchset adds the necessary support code
for creating nested VMs on Intel VMX and a simple functional test
for VMREAD/VMWRITE instructions similar to kvm_svm04.
The changes include refactoring of existing tests so let's merge it
after the upcoming LTP release.
Martin Doucha (10):
kvm_read_sregs(): Read the TR segment register
kvm_svm_vmrun(): Simplify VM state save/load with macros
kvm_x86: Define CR0 flags and additional CPUID/MSR constants
KVM: Implement helper functions for setting x86 control registers
KVM: Add memcmp() helper function
KVM: Add helper functions for nested Intel VMX virtualization
lib: Add helper function for reloading kernel modules
lib: Add helper function for reading boolean sysconf files
kvm_pagefault01: Use library functions to reload KVM modules
KVM: Add functional test for emulated VMREAD/VMWRITE instructions
include/tst_module.h | 3 +
include/tst_sys_conf.h | 2 +
lib/tst_module.c | 28 ++
lib/tst_sys_conf.c | 35 ++
testcases/kernel/kvm/bootstrap_x86.S | 123 ++++-
testcases/kernel/kvm/bootstrap_x86_64.S | 153 ++++--
testcases/kernel/kvm/include/kvm_guest.h | 2 +
testcases/kernel/kvm/include/kvm_x86.h | 19 +-
testcases/kernel/kvm/include/kvm_x86_vmx.h | 201 ++++++++
testcases/kernel/kvm/kvm_pagefault01.c | 59 +--
testcases/kernel/kvm/kvm_vmx01.c | 282 +++++++++++
testcases/kernel/kvm/lib_guest.c | 12 +
testcases/kernel/kvm/lib_x86.c | 515 +++++++++++++++++++++
13 files changed, 1322 insertions(+), 112 deletions(-)
create mode 100644 testcases/kernel/kvm/include/kvm_x86_vmx.h
create mode 100644 testcases/kernel/kvm/kvm_vmx01.c
--
2.47.0
More information about the ltp
mailing list