Skip to content

Nested SVM unit tests

Avi Kivity kvm 1 version Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 5 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8test: move ARRAY_SIZE() to libcflat.hkvm/test/lib/libcflat.h kvm/test/x86/vmexit.c+2 -20 replies
2/8test: move memset() to libcflatkvm/test/lib/libcflat.h kvm/test/lib/string.c kvm/test/x86/access.c +2 more+14 -260 replies
3/8test: add type boolkvm/test/lib/libcflat.h+4 -00 replies
4/8test: add processor register access functionskvm/test/lib/x86/processor.h+246 -00 replies
5/8test: make use of new processor.h headerkvm/test/x86/apic.c kvm/test/x86/emulator.c kvm/test/x86/vm.c +1 more+14 -670 replies
6/8test: add svm definitions headerkvm/test/x86/svm.h+328 -00 replies
7/8test: add msr definitions headerkvm/test/lib/x86/msr.h+406 -00 replies
8/8test: add svm testskvm/test/config-x86-common.mak kvm/test/config-x86_64.mak kvm/test/x86/svm.c+183 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] Nested SVM unit tests

The following patchset adds a framework for nested SVM unit testing. As you may guess, future fixes and enhancements to nested SVM will require matching tests.

Currently, our nested SVM implementation has a 66.67% success rate using these tests.

Avi Kivity (8):
test: move ARRAY_SIZE() to libcflat.h
test: move memset() to libcflat
test: add type bool
test: add processor register access functions
test: make use of new processor.h header
test: add svm definitions header
test: add msr definitions header
test: add svm tests

 kvm/test/config-x86-common.mak |    2 +
 kvm/test/config-x86_64.mak     |    1 +
 kvm/test/lib/libcflat.h        |    9 +
 kvm/test/lib/string.c          |   11 +
 kvm/test/lib/x86/msr.h         |  406 ++++++++++++++++++++++++++++++++++++++++
 kvm/test/lib/x86/processor.h   |  246 ++++++++++++++++++++++++
 kvm/test/x86/access.c          |    8 -
 kvm/test/x86/apic.c            |    8 -
 kvm/test/x86/emulator.c        |   10 +-
 kvm/test/x86/idt.c             |    8 -
 kvm/test/x86/svm.c             |  180 ++++++++++++++++++
 kvm/test/x86/svm.h             |  328 ++++++++++++++++++++++++++++++++
 kvm/test/x86/vm.c              |   30 +---
 kvm/test/x86/vm.h              |   43 +----
 kvm/test/x86/vmexit.c          |    2 -
 15 files changed, 1197 insertions(+), 95 deletions(-)
 create mode 100644 kvm/test/lib/x86/msr.h
 create mode 100644 kvm/test/lib/x86/processor.h
 create mode 100644 kvm/test/x86/svm.c
 create mode 100644 kvm/test/x86/svm.h