Message ID | 170290785069.398.7593700357199640901.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-3783-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1255463dyi; Mon, 18 Dec 2023 05:57:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzfxN5oGDl77esBzKBGEGNYTqW0G394Ns+jd/bfKTzRKyBamjHcIj/rwxD+ROKZB4XerDz X-Received: by 2002:a17:902:780e:b0:1d0:ce26:7ea0 with SMTP id p14-20020a170902780e00b001d0ce267ea0mr8496944pll.57.1702907868974; Mon, 18 Dec 2023 05:57:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702907868; cv=none; d=google.com; s=arc-20160816; b=yd2sVayaA5dNZv2rXNmw4nSG+do2ug+VJjwZ5jvSa0QCVYfqbSleJfji18q14bzIre QpBuBkCPWrlVJ8g7YdHGDhSIJ2hCsNAWeijKVv9Cw7ozUbMu3JAl5B7XqVZEpt2NP0Jw m6k51fGaU2p1mDAFdj+GdeZyHcoXDnq1Le7C+QJMPi0vR7jEtdpHtwCCuxrSarWl9PD6 aEbtk3tRZZFHBMjJdLpQ/JViNccVodnXjGOc5aQGhYFjJB3TvUiO+H45gA+HY26mqOJp 8vfJerOWlFMZLBlycQtxfaKv7KoP5dY3lwWVRkxtJ+pOeFH3rtbtLriRytWN7OWsfDAo ttQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=yKPUIu+lrMG4DdNJrTfiWU7oV+1Ny7jpFBIodEJ0jHU=; fh=eXVkskpfLgB/vZ5AfbgDSC4S3WoZDRZB62a7wLEPepo=; b=ko5J8jd6GfhS1S+1IaZnlI4lueLt/copjoJVc5jYbnPSXoiUwET4u+0j3njrniY4qt DcRs6ooESmMD31a9eJhN/LkWO+80Vf3BY0hixp+JaMNjaMys1kHsMg1xbTc36YT94O5R Kl8BnLxDV1CCBlGyhyJ0Y72DUrUrFsXiDWt4TWviVFlYAlpSc1kPYG6fwH7rP+iVfEDr 4A0wEPYh8IbCaIIJGpBcJmDwQSOBHShy/W7Y6uD4Xhu+nomQqysioKxUrFLG5mFaOBxZ 6wAlcvZBXsYyQPrssvFqyevqyENchbpK5EHexgRXOmak7TEQ2E9E4wyudIZp2hfQH9+c Gzfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Koy+b1tW; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=L1HYhKO1; spf=pass (google.com: domain of linux-kernel+bounces-3783-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3783-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m12-20020a1709026bcc00b001d3535e0c38si9050940plt.345.2023.12.18.05.57.48 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 05:57:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3783-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Koy+b1tW; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=L1HYhKO1; spf=pass (google.com: domain of linux-kernel+bounces-3783-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3783-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 BDFA4280DC6 for <ouuuleilei@gmail.com>; Mon, 18 Dec 2023 13:57:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C5A81D144; Mon, 18 Dec 2023 13:57:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Koy+b1tW"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="L1HYhKO1" X-Original-To: linux-kernel@vger.kernel.org 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 C50201D12D; Mon, 18 Dec 2023 13:57:33 +0000 (UTC) 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 Date: Mon, 18 Dec 2023 13:57:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1702907851; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yKPUIu+lrMG4DdNJrTfiWU7oV+1Ny7jpFBIodEJ0jHU=; b=Koy+b1tWCioaVB26LsGUFhpec+L3stlEEs/vVbfrkEg0DlnmeO28o3N6DYUSKgmOR/Ujxg tUHI9UAPghpOakAbnr1wZWKQA2wpiH+JRYIYez6xpznmzztskSeMQZZJ9iYxQnTkpCI+kt iUG/vB9fvVvJtt5P2j6acuuj/tIfsiqaQTAPYaGQFo3XuT+UA3zv6gZY+xal6N03xlRhgp Ec4m8iVo3Mg5JLabWjiJu9J9f9y6GkCr1cktnClqfKpA73Vwupv1Vb1rU5V0N2MVIQaBpn cF7HPphuSRcsop0dBMJiFJRbkUACXyNDVMfcMWrTbXKjrMZ7KwlrlNEvYN0O5Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1702907851; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yKPUIu+lrMG4DdNJrTfiWU7oV+1Ny7jpFBIodEJ0jHU=; b=L1HYhKO1IYKtcqT3JOxxA710NVhz9JwcIehqqr0VaLPuQd5sRs9WPi9fBiyP4TdwRA0OnE 90xp/KMQFj9iN1Aw== From: "tip-bot2 for Thomas Gleixner" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/acpi: Handle bogus MADT APIC tables gracefully Cc: John Sperbeck <jsperbeck@google.com>, Andres Freund <andres@anarazel.de>, Thomas Gleixner <tglx@linutronix.de>, "Borislav Petkov (AMD)" <bp@alien8.de>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <169953729188.3135.6804572126118798018.tip-bot2@tip-bot2> References: <169953729188.3135.6804572126118798018.tip-bot2@tip-bot2> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Message-ID: <170290785069.398.7593700357199640901.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785628321351393352 X-GMAIL-MSGID: 1785628321351393352 |
Series |
[tip:,x86/urgent] x86/acpi: Handle bogus MADT APIC tables gracefully
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Dec. 18, 2023, 1:57 p.m. UTC
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: d5a10b976ecb77fa49b95f3f1016ca2997c122cb Gitweb: https://git.kernel.org/tip/d5a10b976ecb77fa49b95f3f1016ca2997c122cb Author: Thomas Gleixner <tglx@linutronix.de> AuthorDate: Fri, 15 Dec 2023 15:19:32 +01:00 Committer: Borislav Petkov (AMD) <bp@alien8.de> CommitterDate: Mon, 18 Dec 2023 14:21:44 +01:00 x86/acpi: Handle bogus MADT APIC tables gracefully The recent fix to ignore invalid x2APIC entries inadvertently broke systems with creative MADT APIC tables. The affected systems have APIC MADT tables where all entries have invalid APIC IDs (0xFF), which means they register exactly zero CPUs. But the condition to ignore the entries of APIC IDs < 255 in the X2APIC MADT table is solely based on the count of MADT APIC table entries. As a consequence, the affected machines enumerate no secondary CPUs at all because the APIC table has entries and therefore the X2APIC table entries with APIC IDs < 255 are ignored. Change the condition so that the APIC table preference for APIC IDs < 255 only becomes effective when the APIC table has valid APIC ID entries. IOW, an APIC table full of invalid APIC IDs is considered to be empty which in consequence enables the X2APIC table entries with a APIC ID < 255 and restores the expected behaviour. Fixes: ec9aedb2aa1a ("x86/acpi: Ignore invalid x2APIC entries") Reported-by: John Sperbeck <jsperbeck@google.com> Reported-by: Andres Freund <andres@anarazel.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/169953729188.3135.6804572126118798018.tip-bot2@tip-bot2 --- arch/x86/kernel/acpi/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 1a0dd80..85a3ce2 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -293,6 +293,7 @@ acpi_parse_lapic(union acpi_subtable_headers * header, const unsigned long end) processor->processor_id, /* ACPI ID */ processor->lapic_flags & ACPI_MADT_ENABLED); + has_lapic_cpus = true; return 0; } @@ -1134,7 +1135,6 @@ static int __init acpi_parse_madt_lapic_entries(void) if (!count) { count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, acpi_parse_lapic, MAX_LOCAL_APIC); - has_lapic_cpus = count > 0; x2count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC, acpi_parse_x2apic, MAX_LOCAL_APIC); }