xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "Keir (Xen.org)" <keir@xen.org>, xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] x86: fix boot time APIC mode detection
Date: Thu, 23 May 2013 09:50:28 +0100	[thread overview]
Message-ID: <519DD854.4090807@citrix.com> (raw)
In-Reply-To: <519DDC5E02000078000D859F@nat28.tlf.novell.com>

On 23/05/13 08:07, Jan Beulich wrote:
> current_cpu_data becomes valid only relatively late in the boot
> process, so looking there for a particular feature early in the game
> would generally give the appearance of the feature being unavailable.
>
> Getting this wrong means that at kexec time the system would get
> returned to xAPIC mode, causing disconnect_bsp_APIC() to try to access
> the APIC page, which on systems with x2APIC pre-enabled will never get
> set up.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

>
> --- a/xen/arch/x86/apic.c
> +++ b/xen/arch/x86/apic.c
> @@ -1474,7 +1474,7 @@ enum apic_mode current_local_apic_mode(v
>  
>      /* Reading EXTD bit from the MSR is only valid if CPUID
>       * says so, else reserved */
> -    if ( cpu_has(&current_cpu_data, X86_FEATURE_X2APIC)
> +    if ( boot_cpu_has(X86_FEATURE_X2APIC)
>           && (msr_contents & MSR_IA32_APICBASE_EXTD) )
>          return APIC_MODE_X2APIC;
>  
>
>
>

      parent reply	other threads:[~2013-05-23  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-23  7:07 [PATCH] x86: fix boot time APIC mode detection Jan Beulich
2013-05-23  8:49 ` Keir Fraser
2013-05-23  8:50 ` Andrew Cooper [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=519DD854.4090807@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).