On Wed, Aug 10, 2022, Manali Shukla wrote: > 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, #DB, #AC, #OF, #BP, #NM. > > There are 4 patches in this series > 1) Added test infrastructure and exception tests. > 2) Move #BP test to exception test framework. > 3) Move #OF test to exception test framework. > 4) Move part of #NM test to exception test framework because > #NM has a test case which checks the condition for which #NM should not > be generated, all the test cases under #NM test except this test case have been > moved to exception test framework because of the exception test framework > design. I know Paolo NACKed a full rework to share nVMX and nSVM code, but it's super easy to share the helpers, get a net -100 LoC, and improve nVMX coverage. I've done the work, along with some misc cleanups. I'll post a combined version shortly. lib/x86/processor.h | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ x86/svm_tests.c | 195 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------- x86/vmx_tests.c | 200 +++++++++++-------------------------------------------------------------------------------------------------------------------------------------- 3 files changed, 199 insertions(+), 294 deletions(-)