target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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
On 30/3/26 17:14, Peter Maydell wrote: > 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(-) Queued via hw-misc tree, thanks.
On Mon, Mar 30, 2026 at 04:14:37PM +0100, Peter Maydell wrote: > Date: Mon, 30 Mar 2026 16:14:37 +0100 > From: Peter Maydell <peter.maydell@linaro.org> > Subject: [PATCH] target/i386: Treat qtest like TCG for supported-features > X-Mailer: git-send-email 2.43.0 > > 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. I see, this is a proper way to resolve this for max cpu with qtest, > Signed-off-by: Peter Maydell <peter.maydell@linaro.org> so, Reviewed-by: Zhao Liu <zhao1.liu@intel.com> > --- > 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... yes, when I have some time, I’d see if I can sort this out, to clarify what accelerator needs to be covered here. Regards, Zhao
On 30/3/26 17:14, Peter Maydell wrote: > 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... Indeed. Meanwhile: Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > target/i386/cpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)
© 2016 - 2026 Red Hat, Inc.