ia64/xen-unstable

changeset 18481:a5cc38391afb

ACPI: Grant access of MSR_IA32_THERM_CONTROL MSR to dom0

The purpose is to support dom0 throttling control via MSR.

Signed-off-by: Wei Gang <gang.wei@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Sep 11 16:51:13 2008 +0100 (2008-09-11)
parents d8ce41b79ecc
children 346c073ed6a4
files xen/arch/x86/traps.c
line diff
     1.1 --- a/xen/arch/x86/traps.c	Thu Sep 11 16:50:04 2008 +0100
     1.2 +++ b/xen/arch/x86/traps.c	Thu Sep 11 16:51:13 2008 +0100
     1.3 @@ -2154,6 +2154,12 @@ static int emulate_privileged_op(struct 
     1.4              if ( wrmsr_safe(regs->ecx, eax, edx) != 0 )
     1.5                  goto fail;
     1.6              break;
     1.7 +        case MSR_IA32_THERM_CONTROL:
     1.8 +            if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
     1.9 +                goto fail;
    1.10 +            if ( wrmsr_safe(regs->ecx, eax, edx) != 0 )
    1.11 +                goto fail;
    1.12 +            break;
    1.13          default:
    1.14              if ( wrmsr_hypervisor_regs(regs->ecx, eax, edx) )
    1.15                  break;
    1.16 @@ -2230,6 +2236,12 @@ static int emulate_privileged_op(struct 
    1.17                           MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL |
    1.18                           MSR_IA32_MISC_ENABLE_XTPR_DISABLE;
    1.19              break;
    1.20 +        case MSR_IA32_THERM_CONTROL:
    1.21 +            if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
    1.22 +                goto fail;
    1.23 +            if ( rdmsr_safe(regs->ecx, regs->eax, regs->edx) )
    1.24 +                goto fail;
    1.25 +            break;
    1.26          default:
    1.27              if ( rdmsr_hypervisor_regs(regs->ecx, &l, &h) )
    1.28              {