Extend ept_access_test_read_execute to cover MBEC EPT r-x case, with the caveat that two of the cases do not currently work and are now commented out. Need a hand with sanity checking this, as both of the commented out test cases produce a tight EPT violation loop on the kernel side, and I'm unsure as of yet if its a test side issue (setup?) or what. Tests pass with both -vmx-mbec and +vmx-mbec (for the case that isn't commented out) Signed-off-by: Jon Kohler --- x86/vmx_tests.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c index 465bcf72..e869d702 100644 --- a/x86/vmx_tests.c +++ b/x86/vmx_tests.c @@ -2867,8 +2867,17 @@ static void ept_access_test_read_execute(void) /* r-x */ ept_access_allowed(EPT_RA | EPT_EA, OP_READ); ept_access_violation(EPT_RA | EPT_EA, OP_WRITE, - EPT_VLT_WR | EPT_VLT_PERM_RD | EPT_VLT_PERM_EX); + EPT_VLT_WR | EPT_VLT_PERM_RD | EPT_VLT_PERM_EX); ept_access_allowed(EPT_RA | EPT_EA, OP_EXEC); + if (is_mbec_supported()) { + ept_access_allowed(EPT_RA | EPT_EA_USER, OP_READ); + // FIXME: this one produces EPT_VIOLATION LOOP (doesn't work, should it?) + // ept_access_violation(EPT_RA | EPT_EA_USER, OP_WRITE, + // EPT_VLT_WR | EPT_VLT_PERM_RD | + // EPT_VLT_PERM_EX); + // FIXME: this one produces EPT_VIOLATION LOOP (doesn't work, should it?) + //ept_access_allowed(EPT_RA | EPT_EA_USER, OP_EXEC_USER); + } } static void ept_access_test_write_execute(void) -- 2.43.0