Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1672409rdb; Mon, 8 Jan 2024 06:54:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPrSns1JmHXlSUX0a3jesYY9aXOp0rEmOVr03o+YiIA4wkBcaDZWS3j4k4ITlqFjkQx3Qe X-Received: by 2002:a05:622a:50b:b0:428:39a1:ff70 with SMTP id l11-20020a05622a050b00b0042839a1ff70mr9516172qtx.25.1704725654542; Mon, 08 Jan 2024 06:54:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704725654; cv=none; d=google.com; s=arc-20160816; b=Bvdiw7KyL3IuAjgiskv2sVrkFbfJIpffwjx9dZoAvKi73lXtE78a8xSqMRICZ7h9HK 0OjjX8chvMSbG8aY3uANmOII2fioF70frjeQ0PXPad/PjIH3L1KoKszBq/rs/MYrNt3Z okp3ERyjOSt0CIOS9OpuJD/8gYLXrJVd5bvDJKEMJcjQ10a7eqgy26G2sVoCe/QXHTbZ GZQSW1gAVTLJcHd4KzPLe3YniokHPhIsNNE2gZBDNWRmtr7C8SmMrp0IzpHqwYmu08ni lQp2Lwic5XBNNuzboH3OMvKjKBMGVulWqWK4Rb3M7Z4p8kTPVEw1bmMP1oJBmuQVLk7S U5DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding: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=ciK8VjYrKIFmVLBThi0VCF9byMLKYVzQQI4cn5sOvmM=; fh=Su96M6zoMqPm3G2cJSGfWvGCJMGzJl6AdyFBprIRtwc=; b=zN78k+a/YWrL0TdG3BGomdJ8rwTK5ILLTt5mlsozFHwu0WZPclXMFjweUOsGLuzgXt 7EBUTeD1SPXYwMes7xVfU5NzH3/zfvjXenYOtEwCIZL+bgA9dGbOoNZjkyrMGEe5gS/A oCSRBRpnlXdggwNaIMBaQwuMVKVD/Muv1SZ6Fqq88LzXtx0WoAg0bUx+NV/M4npqcSCS FwYGSrFuld3Lp5g1CCT1C6vr8VNMHl2gnKoKYHNpLUelIFeOfMzphClG57YjV4Z0WMBN mmJ4HR/9j5aMqxIHJWtI6eMgAIv30Vy7uWetzYFcmpAtB9WHgmyKUtVTsbEdH/LmPTg2 YjAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="ZZ24/O/Z"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-19724-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19724-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d7-20020a05622a15c700b00429997b01d5si1341466qty.685.2024.01.08.06.54.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 06:54:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19724-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="ZZ24/O/Z"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-19724-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19724-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 4D7EA1C22A9A for ; Mon, 8 Jan 2024 14:54:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85C404C3D0; Mon, 8 Jan 2024 14:54:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZZ24/O/Z"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="NSryCATY" 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 63E9C4C3A0 for ; Mon, 8 Jan 2024 14:54:06 +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 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1704725644; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ciK8VjYrKIFmVLBThi0VCF9byMLKYVzQQI4cn5sOvmM=; b=ZZ24/O/ZKVFftn/+RMHYcDlpXJml1Ipj6Z9UU8nmC9G732yZhXJXJI2KKwi3umvbIIUr+z ckGNyibfYC2Bv1NmZld8y1+67JlYXa36cn9nzm949ktMtxsB9S2Fo6VNnrnyNFN4F5wn8u yRWwcueK+3md/v+KWIlTW1vRV7XHk/uKyHXrB+JPGfv+8pUIh7DvOWyFR7ILuoaOawXFZj NgqpOgQJtv7OGRHYqnnUpCoYqutoGdmSY4lAwkBGG9eUfvIbZpOtRQndMwSgWEQ5MbjWqO /DWLNZQRpx5DGjCQ9gx4wVQqn5W+8W779XdM7d0jEjfpP1J84Grc+zfSBKC7FA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1704725644; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ciK8VjYrKIFmVLBThi0VCF9byMLKYVzQQI4cn5sOvmM=; b=NSryCATYG+ODQGkAenRu2WtGyno5CPxB/iY3qluH8Xw2whHkeui9KEhY9SE4Kb4mLjoXtO eZKuIIU14DUJOPAg== To: "Zhang, Rui" , "linux-kernel@vger.kernel.org" Cc: "jgross@suse.com" , "mikelley@microsoft.com" , "arjan@linux.intel.com" , "kprateek.nayak@amd.com" , "x86@kernel.org" , "kan.liang@linux.intel.com" , "thomas.lendacky@amd.com" , "ray.huang@amd.com" , "andrew.cooper3@citrix.com" , "Sivanich, Dimitri" , "paulmck@kernel.org" , "Mehta, Sohil" , "andy@infradead.org" , "Tang, Feng" Subject: Re: [patch 37/53] x86/cpu: Detect real BSP on crash kernels In-Reply-To: <7443f3200ef0be756566059e8c9b0657f3cefcff.camel@intel.com> References: <20230807130108.853357011@linutronix.de> <20230807135028.381851690@linutronix.de> <7443f3200ef0be756566059e8c9b0657f3cefcff.camel@intel.com> Date: Mon, 08 Jan 2024 15:54:04 +0100 Message-ID: <871qarlvub.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; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Jan 08 2024 at 14:11, Zhang, Rui wrote: >> +static __init void check_for_kdump_kernel(void) >> +{ >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0u32 bsp_apicid; >> + >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 * There is no real good way = to detect whether this a kdump() >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 * kernel, but except on the = Voyager SMP monstrosity which is >> not >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 * longer supported, the real= BSP has always the lowest >> numbered >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 * APIC ID. If a crash happen= ed on an AP, which then ends up >> as >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 * boot CPU in the kdump() ke= rnel, then sending INIT to the >> real >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 * BSP would reset the whole = system. >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 */ > > > Hi, Thomas, > > Unfortunately this causes a regression on Intel Meteorlake platform, > where the BSP APIC ID is NOT the lowest numbered APIC ID (instead, > CPU12, the first Ecore CPU, has APIC ID 0). Bah. Let me think about that.