i386: Fix MCE support for AMD hosts
authorJohn Allen <john.allen@amd.com>
Mon, 3 Jun 2024 19:36:20 +0000 (19:36 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 8 Jun 2024 08:33:38 +0000 (10:33 +0200)
commit4b77512b2782a6b48691d4341991491de26415de
tree56877980af7bf2facf8996d3f4112d7d7af91f76
parent888788dd7620f8e3fa14108eab2d708c16460266
i386: Fix MCE support for AMD hosts

For the most part, AMD hosts can use the same MCE injection code as Intel, but
there are instances where the qemu implementation is Intel specific. First, MCE
delivery works differently on AMD and does not support broadcast. Second,
kvm_mce_inject generates MCEs that include a number of Intel specific status
bits. Modify kvm_mce_inject to properly generate MCEs on AMD platforms.

Reported-by: William Roche <william.roche@oracle.com>
Signed-off-by: John Allen <john.allen@amd.com>
Message-ID: <20240603193622.47156-2-john.allen@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.h
target/i386/helper.c
target/i386/kvm/kvm.c