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

[Xen-changelog] [xen-unstable] x86: Enable THERM_CONTROL_MSR write for dom0 even when cpufreq=xen



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236265322 0
# Node ID 2a52806199fc5ae896785d0ec726faa9a7d70fed
# Parent  5dee49f3a86e8620042ed575c04306d9a8367fe2
x86: Enable THERM_CONTROL_MSR write for dom0 even when cpufreq=xen

Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/traps.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletion(-)

diff -r 5dee49f3a86e -r 2a52806199fc xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Thu Mar 05 14:55:24 2009 +0000
+++ b/xen/arch/x86/traps.c      Thu Mar 05 15:02:02 2009 +0000
@@ -2187,10 +2187,17 @@ static int emulate_privileged_op(struct 
         case MSR_IA32_MPERF:
         case MSR_IA32_APERF:
         case MSR_IA32_PERF_CTL:
+            if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
+                goto fail;
+            if ( !is_cpufreq_controller(v->domain) )
+                break;
+            if ( wrmsr_safe(regs->ecx, eax, edx) != 0 )
+                goto fail;
+            break;
         case MSR_IA32_THERM_CONTROL:
             if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
                 goto fail;
-            if ( !is_cpufreq_controller(v->domain) )
+            if ( (v->domain->domain_id != 0) || !v->domain->is_pinned )
                 break;
             if ( wrmsr_safe(regs->ecx, eax, edx) != 0 )
                 goto fail;

_______________________________________________
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®.