mbox series

[v2,0/4] Add functional test for AMD VMSAVE/VMLOAD instructions

Message ID 20240514120713.12308-1-mdoucha@suse.cz
Headers show
Series Add functional test for AMD VMSAVE/VMLOAD instructions | expand

Message

Martin Doucha May 14, 2024, 12:07 p.m. UTC
Thanks to a minor bug in LTP KVM library, LTP test kvm_svm02 found a kernel
bug in emulation of VMSAVE and VMLOAD instructions in nested VMs. Add
a thorough functional test for both instructions which can detect and pinpoint
emulation bugs.

Also implement basic printf-like formatting for tst_res() and tst_brk() so
that the test can print incorrect register values to simplify result analysis.
Only standard integer and character conversions are supported. Floating point
number conversions, field alignment and padding are not implemented.

Martin Doucha (4):
  KVM: Disable EBP register use in 32bit code
  KVM: Implement strchr() and basic sprintf()
  KVM: Implement printf-like formatting for tst_res() and tst_brk()
  KVM: Add functional test for VMSAVE/VMLOAD instructions

 configure.ac                             |   2 +
 include/mk/config.mk.in                  |   1 +
 runtest/kvm                              |   1 +
 testcases/kernel/kvm/.gitignore          |   1 +
 testcases/kernel/kvm/Makefile            |   4 +
 testcases/kernel/kvm/include/kvm_guest.h |  19 +-
 testcases/kernel/kvm/kvm_svm04.c         | 307 ++++++++++++++++++++
 testcases/kernel/kvm/lib_guest.c         | 348 ++++++++++++++++++++++-
 8 files changed, 675 insertions(+), 8 deletions(-)
 create mode 100644 testcases/kernel/kvm/kvm_svm04.c