From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932683AbdA0K2S (ORCPT ); Fri, 27 Jan 2017 05:28:18 -0500 Received: from mx2.suse.de ([195.135.220.15]:52020 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932533AbdA0K2O (ORCPT ); Fri, 27 Jan 2017 05:28:14 -0500 Subject: Re: [PATCH] x86/xen: Fix APIC id mismatch warning on Intel To: Mohit Gambhir , Boris Ostrovsky , tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org References: From: Juergen Gross Message-ID: Date: Fri, 27 Jan 2017 11:27:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Juergen Gross Thanks, Juergen