ia64/xen-unstable

changeset 18504:88445b184dc6

x86: Simplify RDMSR pass-through emulation for certain
explicitly-named MSRs (but keep the names in the source code in case
we tighten up RDMSR emulation later).

Also add MSR_AMD_PATCHLEVEL MSR as explicitly required (for Solaris).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Sep 16 13:18:32 2008 +0100 (2008-09-16)
parents 3eb7a0cfffc2
children 879330497672
files xen/arch/x86/traps.c
line diff
     1.1 --- a/xen/arch/x86/traps.c	Tue Sep 16 13:09:04 2008 +0100
     1.2 +++ b/xen/arch/x86/traps.c	Tue Sep 16 13:18:32 2008 +0100
     1.3 @@ -2223,10 +2223,6 @@ static int emulate_privileged_op(struct 
     1.4              if ( rdmsr_safe(regs->ecx, regs->eax, regs->edx) != 0 )
     1.5                  goto fail;
     1.6              break;
     1.7 -        case MSR_EFER:
     1.8 -            if ( rdmsr_safe(regs->ecx, regs->eax, regs->edx) )
     1.9 -                goto fail;
    1.10 -            break;
    1.11          case MSR_IA32_MISC_ENABLE:
    1.12              if ( rdmsr_safe(regs->ecx, regs->eax, regs->edx) )
    1.13                  goto fail;
    1.14 @@ -2236,12 +2232,9 @@ static int emulate_privileged_op(struct 
    1.15                           MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL |
    1.16                           MSR_IA32_MISC_ENABLE_XTPR_DISABLE;
    1.17              break;
    1.18 +        case MSR_EFER:
    1.19          case MSR_IA32_THERM_CONTROL:
    1.20 -            if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
    1.21 -                goto fail;
    1.22 -            if ( rdmsr_safe(regs->ecx, regs->eax, regs->edx) )
    1.23 -                goto fail;
    1.24 -            break;
    1.25 +        case MSR_AMD_PATCHLEVEL:
    1.26          default:
    1.27              if ( rdmsr_hypervisor_regs(regs->ecx, &l, &h) )
    1.28              {