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-users

[Xen-users] [PATCH] RHEL/CentOS 5, Xen 3.4.1 and Power Management

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] [PATCH] RHEL/CentOS 5, Xen 3.4.1 and Power Management
From: "T. Eichstädt" <abc@xxxxxxxxxx>
Date: Sat, 24 Oct 2009 00:02:36 +0200
Delivery-date: Fri, 23 Oct 2009 15:03:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)
Dear all,

Hypervisor-based PM is not working under CentOS 5 with its original kernel.
I had some difficulties to get at least Domain0 based cpufreq working under the CentOS 5 Kernel and Xen 3.4.1. There are problems with the detection of the corrrect Processor ID because the interface of Xen changed a little bit.

With the following patch power management in the combination of CentOS 5 Kernel and Xen 3.4.1 is working again (It is mainly a revert of http://xen.markmail.org/message/ptnjmjaobb3bsutp?q=cpu_id.phys_id).

Hope somebody finds this useful.

Best regards
 Thimo Eichstädt

!!! ATTENTION, PATCH IS ONLY MEANT TO GET PM WORKING WITH CENTOS 5 KERNEL !!!

diff -uNr xen-3.4.1.orig/xen/arch/x86/domain.c xen-3.4.1/xen/arch/x86/domain.c --- xen-3.4.1.orig/xen/arch/x86/domain.c 2009-08-06 15:57:27.000000000 +0200
+++ xen-3.4.1/xen/arch/x86/domain.c     2009-09-07 22:15:33.000000000 +0200
@@ -911,9 +911,8 @@
        if ( !v->domain->is_pinned )
            break;

-        cpu_id.phys_id =
-            (uint64_t)x86_cpu_to_apicid[v->vcpu_id] |
-            ((uint64_t)acpi_get_processor_id(v->vcpu_id) << 32);
+        cpu_id.phys_id = (x86_cpu_to_apicid[v->vcpu_id] |
+                         (acpi_get_processor_id(v->vcpu_id) << 8));

        rc = -EFAULT;
        if ( copy_to_guest(arg, &cpu_id, 1) )
diff -uNr xen-3.4.1.orig/xen/common/domain.c xen-3.4.1/xen/common/domain.c
--- xen-3.4.1.orig/xen/common/domain.c  2009-08-06 15:57:27.000000000 +0200
+++ xen-3.4.1/xen/common/domain.c       2009-09-07 22:14:13.000000000 +0200
@@ -41,7 +41,7 @@
boolean_param("dom0_vcpus_pin", opt_dom0_vcpus_pin);

/* set xen as default cpufreq */
-enum cpufreq_controller cpufreq_controller = FREQCTL_xen;
+enum cpufreq_controller cpufreq_controller = FREQCTL_dom0_kernel;

static void __init setup_cpufreq_option(char *str)
{




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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] [PATCH] RHEL/CentOS 5, Xen 3.4.1 and Power Management, "T. Eichstädt" <=