Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935461AbcKJRQ1 (ORCPT ); Thu, 10 Nov 2016 12:16:27 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:33849 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934541AbcKJRQ0 (ORCPT ); Thu, 10 Nov 2016 12:16:26 -0500 Date: Thu, 10 Nov 2016 18:13:40 +0100 (CET) From: Thomas Gleixner To: Boris Ostrovsky cc: "M. Vefa Bicakci" , Sebastian Andrzej Siewior , "Charles (Chas) Williams" , "x86@kernel.org" , LKML , Peter Zijlstra , Borislav Petkov , David Vrabel , Juergen Gross , xen-devel Subject: Re: [PATCH] x86/cpuid: Deal with broken firmware once more In-Reply-To: <34456dc1-191f-dddb-7881-8409b654cdc8@oracle.com> Message-ID: References: <20161102122557.qs4rl6mb7n7l7j7p@linutronix.de> <24e69019-60d0-29e7-e31f-c6f00f9ed98a@brocade.com> <58e229e2-91f4-a97f-1b9f-089f48ef994a@brocade.com> <86609338-2b45-ed7e-fb07-99421e43a2f1@brocade.com> <49fe8cc5-0f0f-6cac-7a5c-803e81f5667d@runbox.com> <34456dc1-191f-dddb-7881-8409b654cdc8@oracle.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1024 Lines: 26 On Thu, 10 Nov 2016, Boris Ostrovsky wrote: > On 11/10/2016 10:12 AM, Thomas Gleixner wrote: > > On Thu, 10 Nov 2016, Boris Ostrovsky wrote: > >> By firmware you mean ACPI? It is most likely not available to PV guests. > > You either have to provide ACPI or MP tables. And either of those has to > > provide the intial APIC ids for the CPUs. They are supposed to match the > > IDs which are in the CPUID leafs. > > > >> How about returning cpu_data(cpu).initial_apicid? > > For a not yet brought up CPU. That's what the initial ACPI/MP table > > enumeration is for. > > Unfortunately PV guests have neither. So we may need to emulate > something in xen_cpu_present_to_apicid(). SFI does the same thing and according to the dmesg which was posted, this is using SFI. We also have devicetree based boot concept which provides the APICids in the CPU enumeration at boot time in a way which the whole x86 machinery is expecting. So what kind of APICid is XEN handing in via SFI? None, or just an invalid one? Thanks, tglx