Skip to content

Improvements for (nested) SVM testing

Yosry Ahmed kvm lkml 3 versions – Applied

Status from this message: Applied to kvm-x86 next. In the future, please only bundle related and/or

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest14 patches 15 repliesApplied
  2. v28 patches 0 repliesSuperseded
  3. v17 patches 1 replySuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/14scripts: Always return '2' when skipping testsscripts/runtime.bash+2 -20 replies
2/14x86/vmx: Skip vmx_pf_exception_test_fep early if FEP is not availablex86/vmx_tests.c+4 -12 replies
3/14x86/svm: Cleanup selective cr0 write intercept testx86/svm_tests.c+9 -131 reply
4/14x86/svm: Move CR0 selective write intercept test near CR3 interceptx86/svm_tests.c+32 -321 reply
5/14x86/svm: Add FEP helpers for SVM testslib/x86/desc.h x86/svm.c x86/svm.h+14 -00 replies
6/14x86/svm: Report unsupported SVM testsx86/svm.c+3 -10 replies
7/14x86/svm: Move report_svm_guest() to the top of svm_tests.cx86/svm_tests.c+15 -150 replies
8/14x86/svm: Print SVM test names before running testsx86/svm.c+1 -00 replies
9/14x86/svm: Deflake svm_tsc_scale_testx86/svm_tests.c+1 -12 replies
10/14x86/svm: Generalize and improve selective CR0 write intercept testx86/svm_tests.c+25 -130 replies
11/14x86/svm: Add more selective CR0 write and LMSW test casesx86/svm_tests.c+72 -40 replies
12/14x86/svm: Cleanup LBRV testsx86/svm_tests.c+65 -734 replies
13/14x86/svm: Add more LBRV test casesx86/svm_tests.c+80 -00 replies
14/14x86/svm: Rename VMCB fields to match KVMx86/svm.c x86/svm.h x86/svm_tests.c+10 -101 reply

Reviews trailers per patch

3 of 14 patches have a Reviewed-by or Acked-by.

PatchManali ShuklaShivansh Dhiman
1/14
2/14
3/14R-b T-b
4/14R-b
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14R-b T-b
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/14] Improvements for (nested) SVM testing

This is a combined v2/v3 of the patch series in [1] and [2], with a couple of extra changes.

The series mostly includes fixups and cleanups, and more importantly new tests for selective CR0 write intercepts and LBRV, which cover bugs recently fixed by [3] and [4].

Patches 1-2 are unrelated fixups outside of SVM that I just included here instead of submitting separately out of pure laziness.

Patches 3-8 are cleanups and refactoring.

Patch 9 deflakes svm_tsc_scale_test in a not-so-sophisticated way.

Patches 10-11 generalize the existing selective CR0 intercept tests and extend them with new test cases.

Patches 12-13 cleanup the existing LBRV tests and extend them with new test cases.

Patch 14 is a rename to some of VMCB fields to match recent renames in KVM [5]. This is the last patch is in the series also due to laziness.

I realize that the patch ordering is a mess, and I can rebase and reorder if it actually matters to anyone.

[1]https://lore.kernel.org/kvm/[email protected]/ [2]https://lore.kernel.org/kvm/[email protected]/ [3]https://lore.kernel.org/kvm/[email protected]/ [4]https://lore.kernel.org/kvm/[email protected]/ [5]https://lore.kernel.org/kvm/[email protected]/

Yosry Ahmed (14):
scripts: Always return '2' when skipping tests
x86/vmx: Skip vmx_pf_exception_test_fep early if FEP is not available x86/svm: Cleanup selective cr0 write intercept test x86/svm: Move CR0 selective write intercept test near CR3 intercept x86/svm: Add FEP helpers for SVM tests
x86/svm: Report unsupported SVM tests
x86/svm: Move report_svm_guest() to the top of svm_tests.c x86/svm: Print SVM test names before running tests x86/svm: Deflake svm_tsc_scale_test
x86/svm: Generalize and improve selective CR0 write intercept test x86/svm: Add more selective CR0 write and LMSW test cases x86/svm: Cleanup LBRV tests
x86/svm: Add more LBRV test cases
x86/svm: Rename VMCB fields to match KVM

 lib/x86/desc.h       |   8 +
 scripts/runtime.bash |   4 +-
 x86/svm.c            |  12 +-
 x86/svm.h            |   7 +-
 x86/svm_tests.c      | 402 +++++++++++++++++++++++++++++--------------
 x86/vmx_tests.c      |   5 +-
 6 files changed, 303 insertions(+), 135 deletions(-)
Signature · 1 line
2.51.2.1041.gc1ab5b90ca-goog