[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [HVM] Hide contents of IA32_MCG_STATUS MSR from the guest.



# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1184746001 -3600
# Node ID 4721e9d836dd19a593adbe6d32d8c467fce28def
# Parent  45b97e0f2dc817b903bca37a507c8586cddc2919
[HVM] Hide contents of IA32_MCG_STATUS MSR from the guest.
It can't clear the MCE, and it probably can't understand it anyway.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/svm/svm.c |    5 +++++
 xen/arch/x86/hvm/vmx/vmx.c |    4 ++++
 2 files changed, 9 insertions(+)

diff -r 45b97e0f2dc8 -r 4721e9d836dd xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Tue Jul 17 14:09:45 2007 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c        Wed Jul 18 09:06:41 2007 +0100
@@ -2154,6 +2154,11 @@ static void svm_do_msr_access(
             svm_inject_exception(v, TRAP_gp_fault, 1, 0);
             break;
 
+        case MSR_IA32_MCG_STATUS:
+            /* No point in letting the guest see real MCEs */
+            msr_content = 0;
+            break;
+
         default:
             if ( rdmsr_hypervisor_regs(ecx, &eax, &edx) ||
                  rdmsr_safe(ecx, eax, edx) == 0 )
diff -r 45b97e0f2dc8 -r 4721e9d836dd xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Tue Jul 17 14:09:45 2007 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Wed Jul 18 09:06:41 2007 +0100
@@ -2622,6 +2622,10 @@ 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_STATUS:
+        /* No point in letting the guest see real MCEs */
+        msr_content = 0;
+        break;
     default:
         switch ( long_mode_do_msr_read(regs) )
         {

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.