@samitouri / QOSamiQemu / commits / f2a8070d08

target/i386: Treat qtest like TCG for supported-features

In x86_cpu_get_supported_feature_word() we figure out the supported features differently for each accelerator. The default case is "set all feature bits"; however this triggers a warning because it enables two features which conflict with each other: $ ./build/x86/qemu-system-x86_64 -cpu max -accel qtest -S qemu-system-x86_64: warning: this feature conflicts with APX: CPUID[eax=07h,ecx=00h].EBX.mpx [bit 14] qemu-system-x86_64: warning: this feature conflicts with MPX: CPUID[eax=07h,ecx=01h].EDX.apxf [bit 21] Treat qtest like TCG here, to avoid the complaint. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-ID: <20260330151437.1787008-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Peter Maydell committed Mar 30, 2026 at 16:14 UTC f2a8070d08c157511489e71707649f140d35a881
1 file changed +1 -1
target/i386/cpu.c
+1 -1
@@ -8087,7 +8087,7 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w)
8087 r = hvf_get_supported_cpuid(wi->cpuid.eax,
8088 wi->cpuid.ecx,
8089 wi->cpuid.reg);
8090 - } else if (tcg_enabled()) {
8090 + } else if (tcg_enabled() || qtest_enabled()) {
8091 r = wi->tcg_features;
8092 } else {
8093 return ~0;