All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] target/i386: Treat qtest like TCG for supported-features
@ 2026-03-30 15:14 Peter Maydell
  2026-03-30 21:58 ` Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Peter Maydell @ 2026-03-30 15:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Zhao Liu

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>
---
This suggests to me that the default case is not something
we ever want to be in, and we should instead be exhaustively
enumerating the accelerators and asserting if we don't know
how to handle this for the accelerator in use. But there are
several accelerators that we don't have code for here...
---
 target/i386/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 3b0a7c7363..c6fd1dc00e 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -8087,7 +8087,7 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w)
         r = hvf_get_supported_cpuid(wi->cpuid.eax,
                                     wi->cpuid.ecx,
                                     wi->cpuid.reg);
-    } else if (tcg_enabled()) {
+    } else if (tcg_enabled() || qtest_enabled()) {
         r = wi->tcg_features;
     } else {
         return ~0;
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-31 13:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-30 15:14 [PATCH] target/i386: Treat qtest like TCG for supported-features Peter Maydell
2026-03-30 21:58 ` Philippe Mathieu-Daudé
2026-03-31  8:46 ` Zhao Liu
2026-03-31 13:07 ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.