[PATCH] target/i386/cpu.c: Correct minor grammar error in warning

Peter Maydell posted 1 patch 2 days, 10 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260330151309.1786787-1-peter.maydell@linaro.org
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Zhao Liu <zhao1.liu@intel.com>
target/i386/cpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] target/i386/cpu.c: Correct minor grammar error in warning
Posted by Peter Maydell 2 days, 10 hours ago
Fix a minor error in the grammar of the warning messages
produced if both MPX and APX are enabled:

$ ./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]

Fixes: 91bc4d81078a ("i386/cpu: Add APX EGPRs into xsave area")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
As a side note, it seems a bit harsh to turn off *both*
the conflicting features if they're both set, rather than
removing only the older one.
---
 target/i386/cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index d02f6f0653..3b0a7c7363 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -9628,9 +9628,9 @@ void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
     if ((env->features[FEAT_7_0_EBX] & CPUID_7_0_EBX_MPX) &&
         (env->features[FEAT_7_1_EDX] & CPUID_7_1_EDX_APXF)) {
         mark_unavailable_features(cpu, FEAT_7_0_EBX, CPUID_7_0_EBX_MPX,
-            "this feature is conflict with APX");
+            "this feature conflicts with APX");
         mark_unavailable_features(cpu, FEAT_7_1_EDX, CPUID_7_1_EDX_APXF,
-            "this feature is conflict with MPX");
+            "this feature conflicts with MPX");
     }
 
     x86_cpu_enable_xsave_components(cpu);
-- 
2.43.0
Re: [PATCH] target/i386/cpu.c: Correct minor grammar error in warning
Posted by Philippe Mathieu-Daudé 1 day, 12 hours ago
On 30/3/26 17:13, Peter Maydell wrote:
> Fix a minor error in the grammar of the warning messages
> produced if both MPX and APX are enabled:
> 
> $ ./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]
> 
> Fixes: 91bc4d81078a ("i386/cpu: Add APX EGPRs into xsave area")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> As a side note, it seems a bit harsh to turn off *both*
> the conflicting features if they're both set, rather than
> removing only the older one.
> ---
>   target/i386/cpu.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Queued via hw-misc tree, thanks.
Re: [PATCH] target/i386/cpu.c: Correct minor grammar error in warning
Posted by Zhao Liu 1 day, 18 hours ago
On Mon, Mar 30, 2026 at 04:13:09PM +0100, Peter Maydell wrote:
> Date: Mon, 30 Mar 2026 16:13:09 +0100
> From: Peter Maydell <peter.maydell@linaro.org>
> Subject: [PATCH] target/i386/cpu.c: Correct minor grammar error in warning
> X-Mailer: git-send-email 2.43.0
> 
> Fix a minor error in the grammar of the warning messages
> produced if both MPX and APX are enabled:
> 
> $ ./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]
> 
> Fixes: 91bc4d81078a ("i386/cpu: Add APX EGPRs into xsave area")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Thanks!

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

> ---
> As a side note, it seems a bit harsh to turn off *both*
> the conflicting features if they're both set, rather than
> removing only the older one.

Yes, it's a bit harsh. For hardware-accelerated hypervisors, APXF and
MPX are not to coexist (since hardware that supports APXF has already
abandoned MPX).

This check and its handling actually targeted to TCG (preparing for TCG
APXF support).

Well, as I understand it, if both are treated as purely simulated
features, it’s hard to say which one has higher priority. Moreover, in
the cases where both are enabled, at least one of the features is
explicitly specified by the user, but determining exactly which one—or
whether both—was specified by the user is too complicated... So, for
simplicity, I dropped both of them.

Regards,
Zhao


Re: [PATCH] target/i386/cpu.c: Correct minor grammar error in warning
Posted by Philippe Mathieu-Daudé 2 days, 9 hours ago
On 30/3/26 17:13, Peter Maydell wrote:
> Fix a minor error in the grammar of the warning messages
> produced if both MPX and APX are enabled:
> 
> $ ./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]
> 
> Fixes: 91bc4d81078a ("i386/cpu: Add APX EGPRs into xsave area")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> As a side note, it seems a bit harsh to turn off *both*
> the conflicting features if they're both set, rather than
> removing only the older one.
> ---
>   target/i386/cpu.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>