Message ID | 20240823221833.2868-1-seanjc@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [kvm-unit-tests] x86: Force host-phys-bits for normal maxphyaddr access tests | expand |
diff --git a/x86/unittests.cfg b/x86/unittests.cfg index 7c1691a9..6a60bd11 100644 --- a/x86/unittests.cfg +++ b/x86/unittests.cfg @@ -126,12 +126,12 @@ groups = vmexit [access] file = access_test.flat arch = x86_64 -extra_params = -cpu max +extra_params = -cpu max,host-phys-bits [access_fep] file = access_test.flat arch = x86_64 -extra_params = -cpu max -append force_emulation +extra_params = -cpu max,host-phys-bits -append force_emulation groups = nodefault timeout = 240
Explicitly force host-phys-bits for the access tests that intends to run with the host's MAXPHYADDR, as QEMU only forces host-phys-bits for "max" CPUs as of version 6.0 (see commit 5a140b255d ("x86/cpu: Use max host physical address if -cpu max option is applied")). Running the access test with an older QEMU, e.g. 5.3, on a CPU with MAXPHYADDR=52 and allow_smaller_maxphyaddr=N (i.e. with TDP enabled) fails miserably as the test isn't aware that bit 51 is a legal physical address bit. Amusingly, the KVM-Unit-Test appears to pre-date the QEMU change by a few months, which suggests that the KVM-Unit-Test change was made without proper testing, and the QEMU change was made to fix the problem. Fixes: 11cec501 ("x86: cover emulation of reduced MAXPHYADDR") Signed-off-by: Sean Christopherson <seanjc@google.com> --- x86/unittests.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) base-commit: 6b801c8981f74d75419d77e031dd37f5ad356efe