nVMX: Clear A/D enable bit in EPTP after negative testcase on non-A/D host
Sean Christopherson
reviewerPATCH 1/1 nVMX: Clear A/D enable bit in EPTP after negative testcase on non-A/D host
Clear the Access/Dirty enable flag in EPTP after the negative testcase that verifies enabling A/D bits results in failed VM-Entry if A/D bits aren't supported. Leaving the A/D bit set causes the subsequent tests to fail on A/D-disabled hosts.
--- x86/vmx_tests.c | 2 ++ 1 file changed, 2 insertions(+)
x86/vmx_tests.c +2 -0
@@ -4750,6 +4750,8 @@ static void test_ept_eptp(void) eptp |=EPTP_AD_FLAG ;test_eptp_ad_bit (eptp, false); + + eptp &= ~EPTP_AD_FLAG ; }/*
base-commit: f77fb696cfd0e4a5562cdca189be557946bf522f
Signature · 1 line
2.48.1.601.g30ceb7b040-goog
Quoted 6 lines · Sean Christopherson
Clear the Access/Dirty enable flag in EPTP after the negative testcase that verifies enabling A/D bits results in failed VM-Entry if A/D bits aren't supported. Leaving the A/D bit set causes the subsequent tests to fail on A/D-disabled hosts.
Applied to kvm-x86 next (and now pulled by Paolo), thanks!
[1/1] nVMX: Clear A/D enable bit in EPTP after negative testcase on non-A/D host
https://github.com/kvm-x86/kvm-unit-tests/commit/afbea997744e