Mailing List Archive

[xen-unstable] hvm: Intercept reads of MSR_IA32_MCG_CAP and return 0.
# HG changeset patch
# User kfraser@localhost.localdomain
# Date 1188395832 -3600
# Node ID 828e1df114d4b59ebc0a84db3b079f7087fc9b20
# Parent 747b71c8c4a8d0a7e72c2bbadba23d974ba5d10b
hvm: Intercept reads of MSR_IA32_MCG_CAP and return 0.

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 | 1 +
xen/arch/x86/hvm/vmx/vmx.c | 1 +
2 files changed, 2 insertions(+)

diff -r 747b71c8c4a8 -r 828e1df114d4 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c Wed Aug 29 14:54:14 2007 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c Wed Aug 29 14:57:12 2007 +0100
@@ -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:
diff -r 747b71c8c4a8 -r 828e1df114d4 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c Wed Aug 29 14:54:14 2007 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c Wed Aug 29 14:57:12 2007 +0100
@@ -2314,6 +2314,7 @@ static int vmx_do_msr_read(struct cpu_us
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:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xensource.com
http://lists.xensource.com/xen-changelog