From patchwork Mon Aug 7 13:53:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 132216 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1564105vqr; Mon, 7 Aug 2023 09:26:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEFLyIocfCTwa9/HnMSrbNT4/mJRCwEvWj7t+w6haemfvnvJViNSrzgMeIVp8/B20Ta3RGW X-Received: by 2002:a17:90a:5301:b0:268:1b7f:257c with SMTP id x1-20020a17090a530100b002681b7f257cmr6799386pjh.6.1691425615462; Mon, 07 Aug 2023 09:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691425615; cv=none; d=google.com; s=arc-20160816; b=LNIkiewIh0Mr1Z95OwyUS+MQVUElwbg3yJWhNifWybiZr7Psb1pAqppQMN0D8rrsC+ hDObF4R93hHkfGKFP2WO950vXrLqsy57YHUQC/U/QP9umPyl2PkuevrPoWMuyjIwGgAN OJJno7bmiTLFb124m412AzTyOJl0pC1buXfR9zoh9L2a0NlnxL6fPyOy6KgMTYxzVHq5 VOHHZeaDto/EtICOfFXOOo7LbGoz1YSFNHxzsKFF9c4IsuGETHBGYfX1DVLJQLoWv4zv pq/2JP6EpFs6XtngDgFxNo7OH02LPzJp44euRzcNQVUNRQ6Izg7WIJWp2LDeYhjQsraG Lc/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=vSSLVehnXeqS3aVj1Xv9tp4/rOAt2y9JlTCXEhijejo=; fh=/92WVKYrcN3rA268QXyKzVtm/UtxHeI2lnbU295XDiQ=; b=TSIUPTmPCNPJ2OkLCyjHHSsW25q3NM/yk7T1uFwFsyVv2rj+59oRvGZJ6IeS3YBu0O 7O69eAwnlmsX2ZaYLEAb2bYbBKWToXjlxQ3a+8/jPR956SL6vG1Tiz7ehH7iLwAjl/FQ gFfY0ZVd1JGPXWgfvgnL2mCrdg+rkusEPrmHOo/F5LwPaIhu+1Zx/Vml+ScqtmjA9Y3C COe2X8THywSduPCPCr8M+BqSgMEx5gBu3E0/nsrz6MZslmlZKSA/WoQILZBdUF2nSFV3 FJCTUeChUlEZXGFUIBEQ6eQet05b3NEsJmo+4RC1avIc4QD3HT23nhuSlpZICBDqoNox kKNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="3JHKTqT/"; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d16-20020a17090ab31000b00263bf1c6dc0si9030096pjr.102.2023.08.07.09.26.42; Mon, 07 Aug 2023 09:26:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="3JHKTqT/"; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234591AbjHGNyc (ORCPT + 99 others); Mon, 7 Aug 2023 09:54:32 -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) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773588306373012431 X-GMAIL-MSGID: 1773588306373012431 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 +#include + #include #include #include @@ -161,7 +163,8 @@ static int __init acpi_parse_madt(struct static __init void acpi_register_lapic(u32 apic_id, u32 acpi_id, bool present) { - topology_register_apic(apic_id, acpi_id, present); + if (!xen_pv_domain()) + topology_register_apic(apic_id, acpi_id, present); } static bool __init acpi_is_processor_usable(u32 lapic_flags) @@ -1070,7 +1073,8 @@ static int __init early_acpi_parse_madt_ return count; } - register_lapic_address(acpi_lapic_addr); + if (!xen_pv_domain()) + register_lapic_address(acpi_lapic_addr); return count; }