Message ID | 20250214160639.981517-1-seanjc@google.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [kvm-unit-tests] nVMX: Clear A/D enable bit in EPTP after negative testcase on non-A/D host | expand |
On Fri, 14 Feb 2025 08:06:39 -0800, Sean Christopherson wrote: > 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 -- https://github.com/kvm-x86/kvm-unit-tests/tree/next
diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c index ffe7064c..160b50fb 100644 --- a/x86/vmx_tests.c +++ b/x86/vmx_tests.c @@ -4750,6 +4750,8 @@ static void test_ept_eptp(void) eptp |= EPTP_AD_FLAG; test_eptp_ad_bit(eptp, false); + + eptp &= ~EPTP_AD_FLAG; } /*
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. Fixes: 1d70eb82 ("nVMX x86: Check EPTP on vmentry of L2 guests") Signed-off-by: Sean Christopherson <seanjc@google.com> --- x86/vmx_tests.c | 2 ++ 1 file changed, 2 insertions(+) base-commit: f77fb696cfd0e4a5562cdca189be557946bf522f