]> xenbits.xensource.com Git - xen.git/commitdiff
hvm: Intercept reads of MSR_IA32_MCG_CAP and return 0.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 29 Aug 2007 13:57:12 +0000 (14:57 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 29 Aug 2007 13:57:12 +0000 (14:57 +0100)
This indicates no  machine check "units", which agrees more closely
with Xen's super-minimal machine check architecture (just enough to
allow Windows to run). This fixes a bug that occurs when migrating a
RHEL4-64bit guest to a host with fewer machine check units than the
original host.  These host physical details shouldn't be leaking
through to guests.

Signed-off-by: David Lively <dlively@virtualiron.com>
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmx.c

index 597f976a4100da37a75ae9dd007127cb92e74756..46cefe2591e3221903270273e1f912fbc25eb065 100644 (file)
@@ -1876,6 +1876,7 @@ static void svm_do_msr_access(
             svm_inject_exception(v, TRAP_gp_fault, 1, 0);
             break;
 
+        case MSR_IA32_MCG_CAP:
         case MSR_IA32_MCG_STATUS:
         case MSR_IA32_MC0_STATUS:
         case MSR_K8_MC1_STATUS:
index 4309b3d9dfdf4ea219572ee49d5c9ffc6367c673..0dd069ab2e334882333a4be1f2a29a8e24f28a24 100644 (file)
@@ -2314,6 +2314,7 @@ static int vmx_do_msr_read(struct cpu_user_regs *regs)
         break;
     case MSR_IA32_VMX_BASIC...MSR_IA32_VMX_PROCBASED_CTLS2:
         goto gp_fault;
+    case MSR_IA32_MCG_CAP:
     case MSR_IA32_MCG_STATUS:
     case MSR_IA32_MC0_STATUS:
     case MSR_K8_MC1_STATUS: