Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2525468rdb; Mon, 12 Feb 2024 07:39:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLTPAHH4VTgxzvcG7zfs/nVdA7SGBAiUPClMKY80jc+79eXfDZqJR34nbZyyBJ4UxKy+mb X-Received: by 2002:a05:622a:1452:b0:42c:7638:9d41 with SMTP id v18-20020a05622a145200b0042c76389d41mr5125092qtx.54.1707752361390; Mon, 12 Feb 2024 07:39:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707752361; cv=pass; d=google.com; s=arc-20160816; b=yL8QqVr8Rx2lEaxkXbXs62D6/9WaQcVVy99zL4umI7/k/vVs/IElmCDyiZ8QmvPRiN ahZBBsqKHL9llUr5ZOGhzIMIwQ1/4ADgh1PfS3bUjOhIK04qZFD+lnS0SP0bwOWmDQQD 8RPwCQ8nA0M95RTHoX36L6445SrkfK+pK+OKmIqRCRSccYB74Dzi3FdAKRdc6BZ8QH9n 9Prlcz72TgWbKQwqyLGjD6X3LVnfcZwvbSq/dBXA9wPyi0DTbwe5IBMYW1WaeZG9mF+g swdbXPvjvJnkkHP2+2hVVnVXjkvwJVhAgRCwUja22/HcuXz23b5lvoHPoRE6oS2yGzaZ iv+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=XzwovLOo0zq9drJi/JKb20aPld1efJPp16/7MuySCxE=; fh=ACrZR18gch04VsmAGcFIOCHTuXa6zdnmkSaXfHtqqNk=; b=SflsXZaewDrRKzYK0Mrj6Lnh+pB+imDAmq9cJJY7bk57Bc80z6UwzC3xNsNAgnZwpe V68d2hiUvNgB0dEj+wTL70HySkfZb/V/CZ9AZ5L+4WKfOJ/fc9iMr6CiBni1X+SVfuo/ mPL3KFkdqAijGNx+oT3EDtOf8CTzaKaDObmrpttoNw7KTkXu/CmT4nGhjwqePTNvdNHt aDGFSOncfQqhvbbyOJV0LfSJ4U1LWJYrQagpgG1JOg66dqe+GOlK1icuQKNkDtvMWg1K TBylDRWhI3gO/4sQ0dtejadAyhOqN8JmYw6o5hCMt2tjRqp8uvAoxMh0IvE+cVsypV4C zKKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1YZBWIS+; 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-61911-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61911-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; AJvYcCVZgopq5tXUYl+ZW3aEaMYBEd0w3bqhCo/mGAE7lQTAzwfWKjO6XuoRwfR9n1CMydyeVnWNQDH5GFhMphc4xYwU66wtbkk2XhKhyiHfSA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g10-20020ac8480a000000b0042da78e93d2si436122qtq.176.2024.02.12.07.39.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 07:39:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61911-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1YZBWIS+; 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-61911-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61911-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 29DCA1C21CBA for ; Mon, 12 Feb 2024 15:39:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A638F3C6A6; Mon, 12 Feb 2024 15:39:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="1YZBWIS+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ddIc2QxS" 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 5AECB3C495 for ; Mon, 12 Feb 2024 15:39:13 +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=1707752354; cv=none; b=LON0w273s7x2SLSMZGCxaEJMomlfkBUa8OuctKWF3mG7OgnHu44Qcc6xtVCnwoPEX1YSvRjVlxLPRBGu+DMaVYWo5XuF1rB9htLqXohlpvCqHGxh6P7PEHPMkrfxJFqfUPAa6FSSlF18aU+W6/2rTlPGispF0OxofG9589dw9uo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707752354; c=relaxed/simple; bh=wjeNhK7kZBVuy9heSHBrmzMbANAKwBW8sfFYoS7YiDg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=M5F/Y4ChTqGpf8Lo1YfMRnByJdPFPj9yf8fP8qi61cVm41E6LSiU3dWBrtIvHX9m8r2q7ild6tjOpnKPkCdpviEwdoC7ZfBCbSuWxTaM53P0EcEVJkWOmIn0Kd915/g3RIB5a3BQceCDIifPSVvFevXjPxFnX1Mov7cuAPgwECg= 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=1YZBWIS+; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ddIc2QxS; 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 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707752351; 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: in-reply-to:in-reply-to:references:references; bh=XzwovLOo0zq9drJi/JKb20aPld1efJPp16/7MuySCxE=; b=1YZBWIS+5XX7YwgmivTZVFmvj0dOUr/OZcuSaiuXTPhO+HVEs4vKMxtKi+8uHdwJ9vYAH8 0nu3AuXp9RGWomNW0kDF5evKr1JP7ONMN4YTjzvfqcyDOXXIdsIoaq0WMCaEthtez74b24 oOg4YUo/8Dzdyr17GgbN5jfhfoCdWJOtRp2wWufCOiRaFVv154VySCVVmymJQrrzjJvfOC Z7h6L53t7CExhPxflxxkiFeCfYomNhf/zpKJNgck7T4U0UXuw8uHfdcaPgcb2caQA2PxP7 xLCNvzmfOsRKQUiybh8Xciwo06aKyUPL7nekKL0dQFbkp51xbYp7twb2CfWc+A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707752351; 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: in-reply-to:in-reply-to:references:references; bh=XzwovLOo0zq9drJi/JKb20aPld1efJPp16/7MuySCxE=; b=ddIc2QxSaWoASmSmg74hBd9py8FvL0afXJ9gxpXwCPBF++Lc1OgJ3T0QGyilp8hThyRlAd xAQSWWpKFvvF8HAQ== To: Ashok Raj Cc: LKML , 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)" , Andy Shevchenko , Wei Liu , Ashok Raj Subject: Re: [patch V2 01/22] x86/cpu/topology: Make the APIC mismatch warnings complete In-Reply-To: References: <20240117124704.044462658@linutronix.de> <20240117124902.403342409@linutronix.de> Date: Mon, 12 Feb 2024 16:39:11 +0100 Message-ID: <87ttmdk7z4.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Thu, Jan 25 2024 at 01:53, Ashok Raj wrote: > On Tue, Jan 23, 2024 at 02:10:04PM +0100, Thomas Gleixner wrote: >> From: Thomas Gleixner >> >> Detect all possible combinations of mismatch right in the CPUID evaluation >> code. >> >> Signed-off-by: Thomas Gleixner >> >> --- >> arch/x86/include/asm/apic.h | 5 ++--- >> arch/x86/kernel/cpu/common.c | 15 ++------------- >> arch/x86/kernel/cpu/topology_common.c | 12 ++++++++++++ >> 3 files changed, 16 insertions(+), 16 deletions(-) > > [snip] > >> --- a/arch/x86/kernel/cpu/topology_common.c >> +++ b/arch/x86/kernel/cpu/topology_common.c >> @@ -177,6 +177,18 @@ void cpu_parse_topology(struct cpuinfo_x >> >> parse_topology(&tscan, false); >> >> + if (IS_ENABLED(CONFIG_X86_LOCAL_APIC)) { >> + if (c->topo.initial_apicid != c->topo.apicid) { >> + pr_err(FW_BUG "CPU%4u: APIC ID mismatch. CPUID: 0x%04x APIC: 0x%04x\n", >> + cpu, c->topo.initial_apicid, c->topo.apicid); >> + } >> + >> + if (c->topo.apicid != cpuid_to_apicid[cpu]) { >> + pr_err(FW_BUG "CPU%4u: APIC ID mismatch. Firmware: 0x%04x APIC: 0x%04x\n", >> + cpu, cpuid_to_apicid[cpu], c->topo.apicid); >> + } > > Should we consider tainting the kernel when there is any mismatch? No strong opinion about that.