mbox series

[kvm-unit-tests,0/3] nSVM: Add testing for routing L2 exceptions

Message ID 20220207051202.577951-1-manali.shukla@amd.com (mailing list archive)
Headers show
Series nSVM: Add testing for routing L2 exceptions | expand

Message

Manali Shukla Feb. 7, 2022, 5:11 a.m. UTC
Series is inspired by vmx exception test framework series[1].

Set up a test framework that verifies an exception occurring in L2 is 
forwarded to the right place (L1 or L2).

Tests two conditions for each exception.
1) Exception generated in L2, is handled by L2 when L2 exception handler
   is registered.
2) Exception generated in L2, is handled by L1 when intercept exception
   bit map is set in L1.

Above tests were added to verify 8 different exceptions
#GP, #UD, #DE, #BP, #NM, #OF, #DB, #AC.

There are 3 patches in this series
1) Added routines to set/clear PT_USER_MASK to make #AC test work for nSVM. 
2) exception_mnemonic patch is taken from the Aaron's vmx series[1]. 
3) Added test infrastructure and exception tests.

[1] https://lore.kernel.org/all/20220125203127.1161838-1-aaronlewis@google.com/
Aaron Lewis (1):
  x86: Make exception_mnemonic() visible to the tests

Manali Shukla (2):
  x86: Add routines to set/clear PT_USER_MASK for all pages
  x86: nSVM: Add an exception test framework and tests

 lib/x86/desc.c  |   2 +-
 lib/x86/desc.h  |   1 +
 lib/x86/vm.c    |  54 ++++++++++++++
 lib/x86/vm.h    |   3 +
 x86/svm_tests.c | 185 ++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 244 insertions(+), 1 deletion(-)