From nobody Wed Dec 17 03:00:56 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7397EC04A94 for ; Mon, 7 Aug 2023 13:54:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234593AbjHGNyd (ORCPT ); Mon, 7 Aug 2023 09:54:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234542AbjHGNx2 (ORCPT ); Mon, 7 Aug 2023 09:53:28 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C34FA19AF for ; Mon, 7 Aug 2023 06:53:20 -0700 (PDT) Message-ID: <20230807135027.952716842@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691416399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=vSSLVehnXeqS3aVj1Xv9tp4/rOAt2y9JlTCXEhijejo=; b=3JHKTqT/JB1OCS3rE+TjyX4ojVXKcl3pi5D+1q0Hxzz2cHQn6xiu8bYejUmq6MWVHzVJnK WDnG2Px15NK3s+Tda5aCc069U/CtWD0vtJ61ODL1WNuvCCvbN2jziGxilWWhLrpSkhNF4t bez/EVljFOELvX7KfsCnTs55VfvsY5QO/W+F31/j77FPWa7p8qc0r3PEut5L0LJIZbUNit QiJii7bO65YWFV20+w3KglFpULbf+h9uYPpnJ/RGm6UdAecKn2EzhT/NLfWkvzsQY+Vd7D iB/ylLGEIdxUw2GkmHeUI/C450YN0n9FxKzqHIoYT7J/o+CsBM8u6CGRrZ1aUg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691416399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=vSSLVehnXeqS3aVj1Xv9tp4/rOAt2y9JlTCXEhijejo=; b=HpF6jWC3yZXhuGINlovj1jL1sdISUapsfIv1P+MYPN22W8hGyIXv8FqV6QkUR39npPxKxd 3FAC6hYBCT90JECw== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Michael Kelley , Sohil Mehta , K Prateek Nayak , Kan Liang , Zhang Rui , "Paul E. McKenney" , Feng Tang , Andy Shevchenko Subject: [patch 29/53] x86/acpi: Dont invoke topology_register_apic() for XEN PV References: <20230807130108.853357011@linutronix.de> MIME-Version: 1.0 Date: Mon, 7 Aug 2023 15:53:18 +0200 (CEST) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The MADT table for XEN/PV dom0 is not really useful and registering the APICs is momentarily a pointless exercise because XENPV does not use an APIC at all. It overrides the x86_init.mpparse.parse_smp_config() callback, resets num_processors and counts how many of them are provided by the hypervisor. This is in the way of cleaning up the APIC registration. Prevent MADT registration for XEN/PV temporarily until the rework is completed and XEN/PV can use the MADT again. Signed-off-by: Thomas Gleixner --- arch/x86/kernel/acpi/boot.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -23,6 +23,8 @@ #include #include =20 +#include + #include #include #include @@ -161,7 +163,8 @@ static int __init acpi_parse_madt(struct =20 static __init void acpi_register_lapic(u32 apic_id, u32 acpi_id, bool pres= ent) { - topology_register_apic(apic_id, acpi_id, present); + if (!xen_pv_domain()) + topology_register_apic(apic_id, acpi_id, present); } =20 static bool __init acpi_is_processor_usable(u32 lapic_flags) @@ -1070,7 +1073,8 @@ static int __init early_acpi_parse_madt_ return count; } =20 - register_lapic_address(acpi_lapic_addr); + if (!xen_pv_domain()) + register_lapic_address(acpi_lapic_addr); =20 return count; }