diff mbox series

[v2,1/3] target/i386: ignore ARCH_CAPABILITIES features in user mode emulation

Message ID 20230626083317.144746-2-pbonzini@redhat.com
State New
Headers show
Series target/i386: allow using named CPU modeles with user mode emulation | expand

Commit Message

Paolo Bonzini June 26, 2023, 8:33 a.m. UTC
ARCH_CAPABILITIES is only accessible through a read-only MSR, so it has
no impact on any user-mode operation (user-mode cannot read the MSR).
So do not bother printing warnings about it in user mode emulation.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/cpu.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Richard Henderson June 26, 2023, 10:04 a.m. UTC | #1
On 6/26/23 10:33, Paolo Bonzini wrote:
> ARCH_CAPABILITIES is only accessible through a read-only MSR, so it has
> no impact on any user-mode operation (user-mode cannot read the MSR).
> So do not bother printing warnings about it in user mode emulation.
> 
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
>   target/i386/cpu.c | 7 +++++++
>   1 file changed, 7 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index c0fb6b3ad92..8387843c4d9 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -1069,6 +1069,13 @@  FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
         .msr = {
             .index = MSR_IA32_ARCH_CAPABILITIES,
         },
+        /*
+         * FEAT_ARCH_CAPABILITIES only affects a read-only MSR, which
+         * cannot be read from user mode.  Therefore, it has no impact
+         > on any user-mode operation, and warnings about unsupported
+         * features do not matter.
+         */
+        .tcg_features = ~0U,
     },
     [FEAT_CORE_CAPABILITY] = {
         .type = MSR_FEATURE_WORD,