WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 4/4] ACPI: Enable THERM_CONTROL MSR write for dom0 ev

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 4/4] ACPI: Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 4/4] ACPI: Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen, Wei, Gang <=