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/kvm/kvm.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/kvm/kvm.c')
| -rw-r--r-- | target/i386/kvm/kvm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 55a9e8a70c..56d8e2a89e 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -532,6 +532,8 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function, */ cpuid_1_edx = kvm_arch_get_supported_cpuid(s, 1, 0, R_EDX); ret |= cpuid_1_edx & CPUID_EXT2_AMD_ALIASES; + } else if (function == 0x80000007 && reg == R_EBX) { + ret |= CPUID_8000_0007_EBX_SUCCOR; } else if (function == KVM_CPUID_FEATURES && reg == R_EAX) { /* kvm_pv_unhalt is reported by GET_SUPPORTED_CPUID, but it can't * be enabled without the in-kernel irqchip |