AMD PowerNow! in the Hypervisor (hypervisor changes)
PATCH 2/2 AMD PowerNow! in the Hypervisor (hypervisor changes)
This patch set moves support for AMD's PowerNow! technology from dom0 into the hypervisor, now that there is support for transferring ACPI data to the hypervisor. It will only work for AMD processors that support the architectural P-state driver, such as 3rd generation Opterons, Phenoms, and Turion Ultras.
This patch creates the Architectural P-state driver inside of the Xen hypervisor and hooks it into the Xen code. It has been tested at AMD with a variety of para- and fully- virtualized guests for a week without regressions.
It should apply to current xen-unstable.hg.
-Mark Langsdorf
Operating System Research Center
AMD
xen/arch/x86/acpi/cpufreq/Makefile +1 -0
@@ -1,3 +1,4 @@ obj-y += cpufreq.o obj-y += cpufreq.o obj-y += utility.o obj-y += cpufreq_ondemand.o +obj-y += powernow.o
xen/arch/x86/acpi/cpufreq/powernow.c new file +305 -0
305 lines not on this page · raw message
xen/arch/x86/platform_hypercall.c +7 -1
@@ -354,6 +354,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xeint cpuid =get_cpu_id (xenpmpt->id);struct processor_pminfo *pmpt;struct processor_performance *pxpt; +struct cpuinfo_x86 *cpu = &cpu_data[cpuid];if ( cpuid <0 ) {
@@ -408,7 +409,12 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe cpu_count++; }if ( cpu_count ==num_online_cpus () ) - ret =acpi_cpufreq_init (); + { +if (cpu->x86_vendor ==X86_VENDOR_AMD ) + ret =powernow_cpufreq_init (); +else + ret =acpi_cpufreq_init (); + }break ; }
xen/include/acpi/cpufreq/processor_perf.h +1 -0
@@ -6,6 +6,7 @@int get_cpu_id (u8 );int acpi_cpufreq_init (void ); +int powernow_cpufreq_init (void );void px_statistic_update (cpumask_t ,uint8_t ,uint8_t );int px_statistic_init (int );void px_statistic_reset (int );
Quoted 6 lines · Mark Langsdorf
This patch set moves support for AMD's PowerNow! technology from dom0 into the hypervisor, now that there is support for transferring ACPI data to the hypervisor. It will only work for AMD processors that support the architectural P-state driver, such as 3rd generation Opterons, Phenoms, and Turion Ultras.
Quoted 6 lines
This patch creates the Architectural P-state driver inside of the Xen hypervisor and hooks it into the Xen code. It has been tested at AMD with a variety of para- and fully- virtualized guests for a week without regressions.
It should apply to current xen-unstable.hg.
The patch is malformed (according to 'patch'). Perhaps try resending as an attachment.
-- Keir