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

Re: [Xen-devel] [PATCH]x86:x2apic: Disable x2apic on x86-32 permanently

To: "Fengzhe Zhang" <fengzhe.zhang@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]x86:x2apic: Disable x2apic on x86-32 permanently
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Mon, 31 Jan 2011 09:58:56 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxx>
Delivery-date: Mon, 31 Jan 2011 02:01:00 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1A42CE6F5F474C41B63392A5F80372B231F18B24@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <1A42CE6F5F474C41B63392A5F80372B231F18B24@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> On 21.01.11 at 13:21, "Zhang, Fengzhe" <fengzhe.zhang@xxxxxxxxx> wrote:
> --- a/xen/arch/x86/apic.c     Mon Jan 17 18:05:52 2011 +0000
> +++ b/xen/arch/x86/apic.c     Wed Jan 19 03:24:16 2011 -0500
> @@ -961,6 +961,22 @@
>      if ( !cpu_has_x2apic )
>          return;
> 
> +#ifdef __i386__
> +    clear_bit(X86_FEATURE_X2APIC, boot_cpu_data.x86_capability);
> +    if (x2apic_enabled) {
> +        uint64_t msr_content;
> +
> +        rdmsrl(MSR_IA32_APICBASE, msr_content);
> +        msr_content &= ~(MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD);
> +        wrmsrl(MSR_IA32_APICBASE, msr_content);
> +        msr_content |= MSR_IA32_APICBASE_ENABLE;
> +        wrmsrl(MSR_IA32_APICBASE, msr_content);
> +        x2apic_enabled = 0;
> +    }
> +    printk("x2APIC disabled permanently on x86_32.\n");
> +    return;
> +#endif
> +
>      if ( !opt_x2apic )
>      {
>          if ( !x2apic_enabled )

How does this (namely the x2apic_enabled part) play together
with the selection of the APIC driver, which in this case would
have happened quite a bit earlier (from generic_apic_probe())?

I would therefore think that this change really belongs into
check_x2apic_preenabled().

Jan


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