Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp178657rdh; Tue, 13 Feb 2024 13:16:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVqElYdKx8uEWXMaGS4/mbl/c6T7SzYD68zk8v36BE6ElSAj9/GF6n4MJGeKKzYcBmRqEseXd+BD0PXjjtIno64i4w/3t2k0dIcz+6Hxg== X-Google-Smtp-Source: AGHT+IGVMMSyfgXKWmfBXrXHPiz2FJv8r4aX7QezEra51bBTTtOp0CeEvXDjOXYeda1Tp7lXVSOY X-Received: by 2002:a9d:6b09:0:b0:6e2:d985:2d54 with SMTP id g9-20020a9d6b09000000b006e2d9852d54mr1012396otp.0.1707858993626; Tue, 13 Feb 2024 13:16:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707858993; cv=pass; d=google.com; s=arc-20160816; b=QDMDzQrO38A+VwO1EDcHJ1k4AsLDxeJW/aozI/NddgeZWBZvpY3nKuhxsKtTRe2IDd 3O4vpkA1nWcx/dU/wivlT1Em7TVUHdZvCC2PZDAn2WdhXTjFUoyOOtCECZZ6pSswVaYw G9vOhbjaE/8rr03U3Ke9Ngv1Z3D2rKczHZJFDO6Mao9Xw0KiAGoVl1qpJU/Vq7zWTAA5 ojZ0fmQMcQxC3y+aOyL+uxBXU0qT1wMomINfk0hKRBG6POYVOZtZFSCebzMo6pd3/Cln XX9Zm7fP0Ym/YvhOggu0i6c9FXcSLV2qK1yvvLs0eA4cwLd7+7Reaomt26n3jSjuIDwA pb5Q== 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=nsD40VrtK+Xt5SjLXOoTvd1Q6rFpK4PULUaVB4x5tAw=; b=Kay2HukALslrMvSnOPqfp8tDOX05Lgcns5nsvUbCmCf9KHGO22HXcv7J41j6OzHwzJ CyLgxgLdvNT8MHSigE/zTzQe9+fvVP3Am0UQo1PqhlcNwJlbtFY0/BfI/rLfyuYBFs16 8vmc6mCeQdN8zdiiB3klWV7NKzzoAmjbG5xGjkdIxQmvG7+iNmMpeLjD194fpRDB+wNK mhYCGEN71mIoAtk9nYi8Q3yHtA8LNFNsRJ6gSDrdGQunzv3pAkj/pQ96AaC0SUvcWjmi WTV/L+gUVDG/OnlhQbi9/M5gk0N4+wHoUA9NMjeUe9EJu9L9gahXNgb/yvdDr7Ly4M1o ThAQ==; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64292-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCWo9kWsvgu/FrdDUTGlHz0Qc1myU7INPyN89/1kROrnf3YP9wLn9erAowBQ1gtCVWFBbHKg2KcwnFl/M+vR+SHOn93O2yaf8Ws5F306+w== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t19-20020a05622a149300b0042dab04d4fbsi3319767qtx.338.2024.02.13.13.16.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:16:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64292-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64292-linux.lists.archive=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6168E1C220DB for ; Tue, 13 Feb 2024 21:16:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 16016629E7; Tue, 13 Feb 2024 21:05:49 +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 Content-Type: text/plain; charset=UTF-8 Date: Tue, 13 Feb 2024 22:05:43 +0100 (CET) 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; }