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

[Xen-devel] [PATCH 4/4] ACPI: Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen


  • To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Wei, Gang" <gang.wei@xxxxxxxxx>
  • Date: Thu, 26 Feb 2009 21:04:14 +0800
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc: 'Keir Fraser' <keir.fraser@xxxxxxxxxxxxx>
  • Delivery-date: Thu, 26 Feb 2009 05:06:32 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcmYErlDUyweCvc1R7ySGeeN+JHq9Q==
  • Thread-topic: [PATCH 4/4] ACPI: Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen

Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen

Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>

diff -r bd683e0397b4 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Tue Feb 17 22:29:38 2009 +0800
+++ b/xen/arch/x86/traps.c      Wed Feb 25 11:23:01 2009 +0800
@@ -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 ( d->domain_id != 0 )
                 break;
             if ( wrmsr_safe(regs->ecx, eax, edx) != 0 )
                 goto fail;

Attachment: 4-xen-re-enable-THERM_CONTROL-msr.patch
Description: 4-xen-re-enable-THERM_CONTROL-msr.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.