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

Re: [Xen-devel] Workings/effectiveness of the xen-acpi-processor driver



On 02.05.2012 00:35, Boris Ostrovsky wrote:
> On 05/01/2012 04:02 PM, Konrad Rzeszutek Wilk wrote:
>> On Thu, Apr 26, 2012 at 06:25:28PM +0200, Stefan Bader wrote:
>>> On 26.04.2012 17:50, Konrad Rzeszutek Wilk wrote:
>>>> On Wed, Apr 25, 2012 at 03:00:58PM +0200, Stefan Bader wrote:
>>>>> Since there have been requests about that driver to get backported into 
>>>>> 3.2, I
>>>>> was interested to find out what or how much would be gained by that.
>>>>>
>>>>> The first system I tried was an AMD based one (8 core Opteron 6128@2GHz).
>>>>> Which
>>>>> was not very successful as the drivers bail out of the init function
>>>>> because the
>>>>> first call to acpi_processor_register_performance() returns -ENODEV. 
>>>>> There is
>>>>> some frequency scaling when running without Xen, so I need to do some more
>>>>> debugging there.
> 
> I believe this is caused by the somewhat under-enlightened xen_apic_read():
> 
> static u32 xen_apic_read(u32 reg)
> {
>         return 0;
> }
> 
> This results in some data, most importantly boot_cpu_physical_apicid, not 
> being
> set correctly and, in turn, causes x86_cpu_to_apicid to be broken.
> 
> On larger AMD systems boot processor is typically APICID=0x20 (I don't have
> Intel system handy to see how it looks there).
> 
> As a quick and dirty test you can try:
> 
> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> index edc2448..1f78998 100644
> --- a/arch/x86/kernel/apic/apic.c
> +++ b/arch/x86/kernel/apic/apic.c
> @@ -1781,6 +1781,7 @@ void __init register_lapic_address(unsigned long 
> address)
>         }
>         if (boot_cpu_physical_apicid == -1U) {
>                 boot_cpu_physical_apicid  = read_apic_id();
> +               boot_cpu_physical_apicid = 32;
>                 apic_version[boot_cpu_physical_apicid] =
>                          GET_APIC_VERSION(apic_read(APIC_LVR));
>         }
> 
> 
> (Set it to whatever APICID on core0 is, I suspect it won't be zero).
> 

Indeed, when I hack the above id to be 0x10 (as my dmesg tells) most of the BIOS
bug messages are gone and the xen-acpi-processor driver successfully loads and
seems to be switching frequencies ok (just a quick tight loop which made one cpu
go from P4 to P0).

-Stefan

Attachment: dmesg.xen.3
Description: Text document

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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