Since we can't handle NPT VM exits properly. We won't run guest physical bits tests if NPT is enabled. Signed-off-by: Mohammed Gamal <mgamal@xxxxxxxxxx> --- x86/access.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/x86/access.c b/x86/access.c index 7dc9eb6..90c5fe4 100644 --- a/x86/access.c +++ b/x86/access.c @@ -973,6 +973,14 @@ static int ac_test_run(void) invalid_mask |= AC_PTE_BIT36_MASK; } + if (this_cpu_has(X86_FEATURE_NPT)) { + printf("NPT enabled. Skipping physical bits tests\n"); + invalid_mask |= AC_PDE_BIT51_MASK; + invalid_mask |= AC_PTE_BIT51_MASK; + invalid_mask |= AC_PDE_BIT36_MASK; + invalid_mask |= AC_PTE_BIT36_MASK; + } + if (this_cpu_has(X86_FEATURE_PKU)) { set_cr4_pke(1); set_cr4_pke(0); -- 2.26.2