mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Mohit Gambhir <mohit.gambhir@oracle.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org, xen-devel@lists.xenproject.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/xen: Fix APIC id mismatch warning on Intel
Date: Fri, 27 Jan 2017 11:27:48 +0100	[thread overview]
Message-ID: <a518220e-63f1-0832-e2b0-74e26dd9cf7f@suse.com> (raw)
In-Reply-To: <fe4a713b-b6c7-bcd2-b5b5-1359532617d6@oracle.com>

On 26/01/17 19:12, Mohit Gambhir wrote:
> This patch fixes the following warning message seen when booting the
> kernel as Dom0 with Xen on Intel machines.
> 
> [0.003000] [Firmware Bug]: CPU1: APIC id mismatch. Firmware: 0 APIC: 1]
> 
> The code generating the warning in validate_apic_and_package_id() matches
> cpu_data(cpu).apicid (initialized in init_intel()->
> detect_extended_topology() using cpuid) against the apicid returned from
> xen_apic_read(). Now, xen_apic_read() makes a hypercall to retrieve apicid
> for the boot  cpu but returns 0 otherwise. Hence the warning gets thrown
> for all but the boot cpu.
> 
> The idea behind xen_apic_read() returning 0 for apicid is that the
> guests (even Dom0) should not need to know what physical processor their
> vcpus are running on. This is because we currently  do not have topology
> information in Xen and also because xen allows more vcpus than physical
> processors. However, boot cpu's apicid is required for loading
> xen-acpi-processor driver on AMD machines. Look at following patch for
> details:
> 
> commit 558daa289a40 ("xen/apic: Return the APIC ID (and version) for CPU
> 0.")
> 
> So to get rid of the warning, this patch modifies
> xen_cpu_present_to_apicid() to return cpu_data(cpu).apicid instead of
> calling xen_apic_read().
> 
> The warning is not seen on AMD machines because init_amd() populates
> cpu_data(cpu).apicid by calling hard_smp_processor_id()->xen_apic_read()
> as opposed to using apicid from cpuid as is done on Intel machines.
> 
> Signed-off-by: Mohit Gambhir <mohit.gambhir@oracle.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Thanks,

Juergen

  reply	other threads:[~2017-01-27 10:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 18:12 Mohit Gambhir
2017-01-27 10:27 ` Juergen Gross [this message]
2017-01-30  2:58 ` Boris Ostrovsky

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=a518220e-63f1-0832-e2b0-74e26dd9cf7f@suse.com \
    --to=jgross@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mohit.gambhir@oracle.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.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

all inboxes | Powered by JetHome®