ia64/xen-unstable

changeset 19273:2a52806199fc

x86: Enable THERM_CONTROL_MSR write for dom0 even when cpufreq=xen

Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Mar 05 15:02:02 2009 +0000 (2009-03-05)
parents 5dee49f3a86e
children 29cc9eef7939
files xen/arch/x86/traps.c
line diff
     1.1 --- a/xen/arch/x86/traps.c	Thu Mar 05 14:55:24 2009 +0000
     1.2 +++ b/xen/arch/x86/traps.c	Thu Mar 05 15:02:02 2009 +0000
     1.3 @@ -2187,10 +2187,17 @@ static int emulate_privileged_op(struct 
     1.4          case MSR_IA32_MPERF:
     1.5          case MSR_IA32_APERF:
     1.6          case MSR_IA32_PERF_CTL:
     1.7 +            if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
     1.8 +                goto fail;
     1.9 +            if ( !is_cpufreq_controller(v->domain) )
    1.10 +                break;
    1.11 +            if ( wrmsr_safe(regs->ecx, eax, edx) != 0 )
    1.12 +                goto fail;
    1.13 +            break;
    1.14          case MSR_IA32_THERM_CONTROL:
    1.15              if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
    1.16                  goto fail;
    1.17 -            if ( !is_cpufreq_controller(v->domain) )
    1.18 +            if ( (v->domain->domain_id != 0) || !v->domain->is_pinned )
    1.19                  break;
    1.20              if ( wrmsr_safe(regs->ecx, eax, edx) != 0 )
    1.21                  goto fail;