ia64/xen-unstable

changeset 15612:4721e9d836dd

[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@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Wed Jul 18 09:06:41 2007 +0100 (2007-07-18)
parents 45b97e0f2dc8
children 4197a1aad70b
files xen/arch/x86/hvm/svm/svm.c xen/arch/x86/hvm/vmx/vmx.c
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/svm.c	Tue Jul 17 14:09:45 2007 +0100
     1.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Wed Jul 18 09:06:41 2007 +0100
     1.3 @@ -2154,6 +2154,11 @@ static void svm_do_msr_access(
     1.4              svm_inject_exception(v, TRAP_gp_fault, 1, 0);
     1.5              break;
     1.6  
     1.7 +        case MSR_IA32_MCG_STATUS:
     1.8 +            /* No point in letting the guest see real MCEs */
     1.9 +            msr_content = 0;
    1.10 +            break;
    1.11 +
    1.12          default:
    1.13              if ( rdmsr_hypervisor_regs(ecx, &eax, &edx) ||
    1.14                   rdmsr_safe(ecx, eax, edx) == 0 )
     2.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Tue Jul 17 14:09:45 2007 +0100
     2.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Wed Jul 18 09:06:41 2007 +0100
     2.3 @@ -2622,6 +2622,10 @@ static int vmx_do_msr_read(struct cpu_us
     2.4          break;
     2.5      case MSR_IA32_VMX_BASIC...MSR_IA32_VMX_PROCBASED_CTLS2:
     2.6          goto gp_fault;
     2.7 +    case MSR_IA32_MCG_STATUS:
     2.8 +        /* No point in letting the guest see real MCEs */
     2.9 +        msr_content = 0;
    2.10 +        break;
    2.11      default:
    2.12          switch ( long_mode_do_msr_read(regs) )
    2.13          {