summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx
diff options
context:
space:
mode:
authorJue Wang <juew@google.com>2022-06-10 19:11:33 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-24 10:52:03 +0200
commitaebc3ca19063d68b76bcaaca81558d4f180c61b0 (patch)
treeb1d80c671dc1a07e35f8039be0a2c1ad89022ff3 /arch/x86/kvm/vmx
parentKVM: x86: Add emulation for MSR_IA32_MCx_CTL2 MSRs. (diff)
downloadlinux-aebc3ca19063d68b76bcaaca81558d4f180c61b0.tar.xz
linux-aebc3ca19063d68b76bcaaca81558d4f180c61b0.zip
KVM: x86: Enable CMCI capability by default and handle injected UCNA errors
This patch enables MCG_CMCI_P by default in kvm_mce_cap_supported. It reuses ioctl KVM_X86_SET_MCE to implement injection of UnCorrectable No Action required (UCNA) errors, signaled via Corrected Machine Check Interrupt (CMCI). Neither of the CMCI and UCNA emulations depends on hardware. Signed-off-by: Jue Wang <juew@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220610171134.772566-8-juew@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx')
-rw-r--r--arch/x86/kvm/vmx/vmx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 4002f6cc179d..c30115b9cb33 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -8299,6 +8299,7 @@ static __init int hardware_setup(void)
}
kvm_caps.supported_mce_cap |= MCG_LMCE_P;
+ kvm_caps.supported_mce_cap |= MCG_CMCI_P;
if (pt_mode != PT_MODE_SYSTEM && pt_mode != PT_MODE_HOST_GUEST)
return -EINVAL;