Skip to content

Combined GMET and MBEC tests

Paolo Bonzini kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9move PFERR_* constants to liblib/x86/asm/page.h x86/access.c+7 -70 replies
2/9add definitions for nested_ctlx86/svm.c x86/svm.h+4 -10 replies
3/9svm: add basic GMET testsMakefile lib/x86/processor.h x86/svm.c +2 more+101 -32 replies
4/9x86/vmx: update EPT installation to use EPT_PRESENT flagx86/vmx.c x86/vmx.h x86/vmx_tests.c+20 -200 replies
5/9x86/vmx: diagnose unexpected EPT violationslib/util.h x86/vmx.h x86/vmx_tests.c+44 -390 replies
6/9x86/vmx: add mode-based execute control test for Skylake and abovex86/unittests.cfg x86/vmx.h x86/vmx_tests.c+81 -01 reply
7/9x86/vmx: add user execution operation to EPT access testsx86/vmx_tests.c+47 -40 replies
8/9x86/vmx: run EPT tests with MBEC enabled when availablex86/unittests.cfg x86/vmx.h x86/vmx_tests.c+94 -214 replies
9/9x86/vmx: add EPT tests covering XU permissionx86/vmx_tests.c+120 -01 reply

Reviews trailers per patch

None of the 9 patches has a Reviewed-by or Acked-by.

PatchJon Kohler
1/9
2/9
3/9
4/9
5/9
6/9Co-authored-by
7/9Co-authored-by
8/9Co-authored-by
9/9Co-authored-by

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

Read the v1 thread

Cover letter [PATCH kvm-unit-tests 0/9] Combined GMET and MBEC tests

This adds new tests for both GMET and MBEC.

The code for MBEC is roughly based on the previous submission at
https://lore.kernel.org/kvm/[email protected]/,
though with pretty heavy reorganization and fixing work on top.

The existing EPT tests now test execution on both supervisor and user-mode pages, with different expected outcomes depending on whether MBEC is enabled or not; on top of this, the last patch adds tests for XU=1 and XS=XU=1.

For simplicity, the tests always enable MBEC when available. A new block in unittests.cfg ensures that both non-MBEC and MBEC is covered.

I will shortly send a new version of the patches that passes the tests.

Paolo

Jon Kohler (1):
x86/vmx: update EPT installation to use EPT_PRESENT flag

Paolo Bonzini (8):
move PFERR_* constants to lib
add definitions for nested_ctl
svm: add basic GMET tests
x86/vmx: diagnose unexpected EPT violations
x86/vmx: add mode-based execute control test for Skylake and above x86/vmx: add user execution operation to EPT access tests x86/vmx: run EPT tests with MBEC enabled when available x86/vmx: add EPT tests covering XU permission

 Makefile            |   2 +-
 lib/util.h          |  10 +-
 lib/x86/asm/page.h  |   7 +
 lib/x86/processor.h |   1 +
 x86/access.c        |   7 -
 x86/svm.c           |  19 +-
 x86/svm.h           |   4 +
 x86/svm_npt.c       |  83 ++++++++-
 x86/unittests.cfg   |  21 ++-
 x86/vmx.c           |   3 +-
 x86/vmx.h           |  32 ++--
 x86/vmx_tests.c     | 414 +++++++++++++++++++++++++++++++++++++-------
 12 files changed, 513 insertions(+), 90 deletions(-)
Signature · 1 line
2.52.0