diff options
| author | John Allen <john.allen@amd.com> | 2024-06-03 19:36:21 +0000 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-06-08 10:33:39 +0200 |
| commit | 2ba8b7ee63589d4063c3b8dff3b70dbf9e224fc6 (patch) | |
| tree | 750b6c80830a50b0ae64e48c00f426b65b202093 /target/i386/cpu.c | |
| parent | 4b77512b2782a6b48691d4341991491de26415de (diff) | |
| download | focaccia-qemu-2ba8b7ee63589d4063c3b8dff3b70dbf9e224fc6.tar.gz focaccia-qemu-2ba8b7ee63589d4063c3b8dff3b70dbf9e224fc6.zip | |
i386: Add support for SUCCOR feature
Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required to be exposed to guests to allow them to handle machine check exceptions on AMD hosts. ---- v2: - Add "succor" feature word. - Add case to kvm_arch_get_supported_cpuid for the SUCCOR feature. Reported-by: William Roche <william.roche@oracle.com> Reviewed-by: Joao Martins <joao.m.martins@oracle.com> Signed-off-by: John Allen <john.allen@amd.com> Message-ID: <20240603193622.47156-3-john.allen@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/cpu.c')
| -rw-r--r-- | target/i386/cpu.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 383230fa47..c5a532a254 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1180,6 +1180,22 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = { .tcg_features = TCG_APM_FEATURES, .unmigratable_flags = CPUID_APM_INVTSC, }, + [FEAT_8000_0007_EBX] = { + .type = CPUID_FEATURE_WORD, + .feat_names = { + NULL, "succor", NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + }, + .cpuid = { .eax = 0x80000007, .reg = R_EBX, }, + .tcg_features = 0, + .unmigratable_flags = 0, + }, [FEAT_8000_0008_EBX] = { .type = CPUID_FEATURE_WORD, .feat_names = { @@ -6887,7 +6903,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, break; case 0x80000007: *eax = 0; - *ebx = 0; + *ebx = env->features[FEAT_8000_0007_EBX]; *ecx = 0; *edx = env->features[FEAT_8000_0007_EDX]; break; |