KVM: Handle writes to MCG_STATUS msr
authorSergey Kiselev <sergey.kiselev@intel.com>
Thu, 22 Mar 2007 12:06:18 +0000 (14:06 +0200)
committerAvi Kivity <avi@qumranet.com>
Thu, 3 May 2007 07:52:26 +0000 (10:52 +0300)
Some older (~2.6.7) kernels write MCG_STATUS register during kernel
boot (mce_clear_all() function, called from mce_init()). It's not
currently handled by kvm and will cause it to inject a GPF.
Following patch adds a "nop" handler for this.

Signed-off-by: Sergey Kiselev <sergey.kiselev@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm_main.c

index 05235e1751fb0d8b58751702c287156aea192103..33eade7e237c4072f57f4ff0f75f8d3a6607e504 100644 (file)
@@ -1467,6 +1467,10 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
                printk(KERN_WARNING "%s: MSR_IA32_MC0_STATUS 0x%llx, nop\n",
                       __FUNCTION__, data);
                break;
+       case MSR_IA32_MCG_STATUS:
+               printk(KERN_WARNING "%s: MSR_IA32_MCG_STATUS 0x%llx, nop\n",
+                       __FUNCTION__, data);
+               break;
        case MSR_IA32_UCODE_REV:
        case MSR_IA32_UCODE_WRITE:
        case 0x200 ... 0x2ff: /* MTRRs */