diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-06-20 19:53:59 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-12 17:48:32 +0200 |
commit | 0f1f06ca61d8f1290780829728603c570834b3c0 (patch) | |
tree | 946f670ef57af47df2b3f815ed80238ff53c518f | |
parent | 336dbe8e9993da447630f7edb59152dd7edcdcd1 (diff) | |
download | qemu-0f1f06ca61d8f1290780829728603c570834b3c0.zip qemu-0f1f06ca61d8f1290780829728603c570834b3c0.tar.gz qemu-0f1f06ca61d8f1290780829728603c570834b3c0.tar.bz2 |
target/i386: list TCG-supported features for CPUID[80000021h].EAX
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | target/i386/cpu.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 1ca6307..1656de3 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -922,6 +922,17 @@ void x86_cpu_vendor_words2str(char *dst, uint32_t vendor1, #define TCG_8000_0008_EBX (CPUID_8000_0008_EBX_XSAVEERPTR | \ CPUID_8000_0008_EBX_WBNOINVD | CPUID_8000_0008_EBX_KERNEL_FEATURES) +#if defined CONFIG_USER_ONLY +#define CPUID_8000_0021_EAX_KERNEL_FEATURES CPUID_8000_0021_EAX_AUTO_IBRS +#else +#define CPUID_8000_0021_EAX_KERNEL_FEATURES 0 +#endif + +#define TCG_8000_0021_EAX_FEATURES ( \ + CPUID_8000_0021_EAX_NO_NESTED_DATA_BP | \ + CPUID_8000_0021_EAX_NULL_SEL_CLR_BASE | \ + CPUID_8000_0021_EAX_KERNEL_FEATURES) + FeatureWordInfo feature_word_info[FEATURE_WORDS] = { [FEAT_1_EDX] = { .type = CPUID_FEATURE_WORD, @@ -1249,7 +1260,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = { "ibpb-brtype", "srso-no", "srso-user-kernel-no", NULL, }, .cpuid = { .eax = 0x80000021, .reg = R_EAX, }, - .tcg_features = 0, + .tcg_features = TCG_8000_0021_EAX_FEATURES, .unmigratable_flags = 0, }, [FEAT_8000_0021_EBX] = { |