From patchwork Tue Feb 13 21:05:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 200636 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp813397dyb; Tue, 13 Feb 2024 13:17:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVzdYDvBo7sgRdJ2NCAJ8The4PpyQt5w3+roFJ+RaMeRvfGOvq/g8w2KwtQd7crgS8ZeDKJGFbYANDRuLv1zZauvr2C3w== X-Google-Smtp-Source: AGHT+IGx+bYUNL6I4evgW/aeBJ1fb3EcNZIueQwMVSVck7IdFinfa4hlXVi4buDzKWZpUi+uey/v X-Received: by 2002:a17:90a:c38e:b0:297:966:8f4d with SMTP id h14-20020a17090ac38e00b0029709668f4dmr689895pjt.46.1707859036389; Tue, 13 Feb 2024 13:17:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707859036; cv=pass; d=google.com; s=arc-20160816; b=Ij4nqU7T/4PfdPB1ZZDEhPfCcklhfAGvQ5d0llAQ2QXjV98QzAGgt9xie4WYzxgrZW H+cnAak+ehlr0iNhxO3CYdnyTHoKd74byq+ssuefpql6gnwTCa9iQnDMGDjX1u6+FeL/ xfPkZBT0mQQPA2x2VgUohNhLoP3U7zGEEdxQAB8mqhbPGqyfDoDDV/DjuZPC10XrEaKQ UbVBBxS8D2p0rxBD+WNSaiG2nU2rZSlnl7JW6Uoxu4wUDGaYHTKs2DxsD+CKt4lxfQQY 3mbU4N2sO13M2sfY7VhuvRoA1xR2juhw7KoxEX98g0TC6r8LElCYURekhpH7zYMseelN F1sQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:subject:cc:to:from:dkim-signature :dkim-signature:message-id; bh=zfzAs64wbbWdEGs0dn8m5hF5zCfLwYbKo95JpIfEf0U=; fh=SeGr4+LRyFS0ky97+AYZTjc08UnUNe9R/dybb1C5flM=; b=tCUJtmYTJ1w0wOpLS1bN2JPE6oKWcv/FMFVEvii+FHROF+LOpelmQrBZ5WI+9t4dfW 7Zesm17CtybYVWdpFU0gIbvuFkOaOSzHYhp/qOOVRUs0gGl1RPJ7NOTwMQ2F043CyRuZ /KXZmU5Ak+M/PjJ8Q+LDbwgoKEsb7mwsqOdRheHnMUSHEfy7hDkaP625sVtzdnu5g8CR SopReus6WstP2gqngdZXaIisQMYDCqEHSSFNGXnSvU4NWbEYZZXDBJLC3gTPcqk+lBMr 4KH81pdGaLUKQ4FF5xK2RSDa3RDw43kbByd4fqTmHdzxnZojTIAo9TOmC/e5tGC/mkGN J3CQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="YMa/4oRs"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-64292-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64292-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCVOgoYxQukB7jO74RVdJ0SxzxhQO91hyajXRk+CDVSVMM2JYsxGteBk5L5UlF1MUIjcy/23BAb7gQixz8Dy3N5ef2lGvA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n10-20020a17090a9f0a00b00298cdde79dbsi330381pjp.154.2024.02.13.13.17.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:17:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64292-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="YMa/4oRs"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-64292-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64292-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A80ED287060 for ; Tue, 13 Feb 2024 21:16:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D875E7E114; Tue, 13 Feb 2024 21:05:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YMa/4oRs"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="IilBDjYa" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A51097A715 for ; Tue, 13 Feb 2024 21:05:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858348; cv=none; b=IOjEUPXk5A10LWJ0u71SpVHXdYm0mhwnvdQdBR7/RO18RxoJgXCNbuW9aavcsuPd+9MiuQRc1ueDldzos3tOvmGW32t1yRpaSf1kop7VQIQeHdMKZQZk8sTKIqS+3hKJ5lyO3TuVubyxL36ebOFlDVp+7IUB+41V7KaolB5BpoY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858348; c=relaxed/simple; bh=mSWHUsAxY2vmF0UO1GwGRNnmjm20vOkVOPe+MQZCqus=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=dJU7EijMsP+AHsITCE5QVNrLlHGPxe8prZjNhYvG35K66eY/62A9Krr+45hZBSpgcz6lDTKUSyeatb+B09hYb9yXCId0DNRPVAuC25wWVmdJrKrXdQEYhMdDoexd5Q2OnGCS9gHs4kE341RXDqjHAC/pcF+BzqyqWvVeVFTHLEI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=YMa/4oRs; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=IilBDjYa; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Message-ID: <20240213210251.885489468@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707858343; 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=zfzAs64wbbWdEGs0dn8m5hF5zCfLwYbKo95JpIfEf0U=; b=YMa/4oRsy0Pii4k/xjdkMaYv4i3IMWaYiTXJC3ucB6Sekc/vkVV4XYDv6hyTkrdaD9o/FI LqzC7mu/f23ZXt6llYj6xU2faiLibcl4sM0wS1H1caH4bu/8P++VMOp5VcXls5HjREYSMl umdZ7PqfWilYj2EdQPd4G3F11d3XrAIu0PbiP8BAkdqnPsb6vBQwCONyQ03fqURXStuojh s0TY6exnOd/ETrIIe/lo3rZzCx19DdQOPTiZTrGsSCgjndZr750/T0YSYjuflLjxRky/PE 0xTiJ4VdgxnTEK0KXIwEfiUvegP4ExN7uw454Wm5aaCuYKKYTBxjQ2HjmnVaCw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707858343; 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=zfzAs64wbbWdEGs0dn8m5hF5zCfLwYbKo95JpIfEf0U=; b=IilBDjYa2CMXByjzWh8M66Rwa6nYypEhsd1xMTUvOTrb8HisiDeKEb/twy+tfW6m0zOmYv qbQ82LK9C+jdGdDA== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Sohil Mehta , K Prateek Nayak , Kan Liang , Zhang Rui , "Paul E. McKenney" , Feng Tang , Andy Shevchenko , Michael Kelley , "Peter Zijlstra (Intel)" Subject: [patch 07/30] x86/acpi: Dont invoke topology_register_apic() for XEN PV References: <20240213205415.307029033@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Tue, 13 Feb 2024 22:05:43 +0100 (CET) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790819996742582518 X-GMAIL-MSGID: 1790819996742582518 From: Thomas Gleixner 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 @@ -166,7 +168,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) @@ -1087,7 +1090,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; }