From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760767AbcJ1Thc (ORCPT ); Fri, 28 Oct 2016 15:37:32 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:48228 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753174AbcJ1Thb (ORCPT ); Fri, 28 Oct 2016 15:37:31 -0400 Date: Fri, 28 Oct 2016 21:34:53 +0200 (CEST) From: Thomas Gleixner To: Michal Necasek cc: prarit@redhat.com, ville.syrjala@linux.intel.com, michael.thayer@oracle.com, knut.osmundsen@oracle.com, frank.mehnert@oracle.com, linux-kernel@vger.kernel.org Subject: Re: 4.8.2 not booting in 32-bit VM without I/O-APIC In-Reply-To: Message-ID: References: <6f385a6a-1f22-4be7-8005-28b714ca271a@default> 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 On Fri, 28 Oct 2016, Thomas Gleixner wrote: > On Fri, 28 Oct 2016, Michal Necasek wrote: > > > > Sorry if I wasn't clear. No, it doesn't work for us. The ff8560512b8d > > commit fixes the APIC poking on machines where there is no local APIC > > available (and thus fixes the committer's machine), but it doesn't work > > in our case, where there is a local APIC but no I/O APIC, no ACPI MADT, > > and no MP tables. > > > In other words, for us boot_cpu_has(X86_FEATURE_APIC) is true but the > > APIC has not been set up yet because init_apic_mappings() hasn't been > > run. Right. That mapping setup is an utter trainwreck as we do it from multiple places, but there is no reason why we can't move it before the call to prefill_possible_map(). Thanks, tglx diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index bbfbca5fea0c..b59fdba3cbdf 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -1221,11 +1221,13 @@ void __init setup_arch(char **cmdline_p) */ get_smp_config(); + /* Make sure apic is mapped before prefill_possible_map() */ + init_apic_mappings(); + prefill_possible_map(); init_cpu_to_node(); - init_apic_mappings(); io_apic_init_mappings(); kvm_guest_init();