Linux' AMD MCE code tries to read from the MC4_MISC1 (0xc0000408) MSR. Because
this read is not virtualized within KVM, a GPE is injected into the guest.
This patch handles guest reads from MC4_MISC and returns 0 to the guest.

Signed-off-by: Matthias Lange <matthias.la...@kernkonzept.com>
---
 arch/x86/kvm/x86.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 24d70d4..d5a305b 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2530,6 +2530,9 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, 
u64 *pdata)
                        return 1;
                data = vcpu->arch.osvw.status;
                break;
+       case 0xc0000408: /* MC4_MISC1 */
+               data = 0;
+               break;
        default:
                if (kvm_pmu_msr(vcpu, msr))
                        return kvm_pmu_get_msr(vcpu, msr, pdata);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to