Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1722994rdb; Mon, 8 Jan 2024 08:13:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHyog+vIx1P9zHYHRkUQlvfztbTNWhCaj1rAFphkdKVpwI5qFXtbd4Xh+oZX08vBlVpfL3H X-Received: by 2002:a50:9e0f:0:b0:555:bb88:cba3 with SMTP id z15-20020a509e0f000000b00555bb88cba3mr2382903ede.27.1704730424274; Mon, 08 Jan 2024 08:13:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704730424; cv=none; d=google.com; s=arc-20160816; b=JY9VXkzbOFxHnhlEeTgmPldFLsdSZsdp4G8bih4pySdeTkN2jGiQbk4PCSiAOa+YHX nQijd9oozhby9sUyZHpjxUnAwOCH53Rm9rDV2AR8AIMfJTdRF7kvq2+ajrgmO22ttq5q 9NmT+C+Y3MkXu0PDmVWgXvvRYfM+v92qnUHzKm0KI4gRQVAxQZb5OK3kqJ3azOFsl152 nlqF7av21B2RAgdXT8/3DDoI0uxF7d23V5C/C4k+oyjEpNqC9XT4ymrfKvrAXv2QDNYO q0QEKwa2+BqykDQDwtvXfEyiw9PsCqxrjeEHPycahKHk7uAjeHfg//Z9ZRGTcMlP7t8T HkWA== 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=rvUicjBGSwsOvS9W+LrZ7jgrjMu62sy16+o7dUgEHbs=; fh=+W2TYG1diB9yWgcTHhuydIV+VUMImi7ecVxEGUR6vrE=; b=PBVIesSvkfVZnC/aoqesgeZiZTWQWkH291J5aGm+0wqIv0iTOzkQQiox1K3tviQ/3H nCflcXms9ameQwUU/4HeNvkE/9iGWCinn0KP3uvwiQ+J9vvNw7TVvWQKR8GqhZ5YLigw NSbRboWcGDg2spQ0JnvV3XDwSX51DA693V2irW2MNKlhGVvNuhbI3l/ObYGFzdd0ILUk Ikrm9adV81Y2nzY/Y6k90R3JJaNUEH2cQxkFAnInNnEB2INTFBW2CiLrFcFxzDEBAivW C8tLixei053GX1D+UfrCdgZp8a3Otv9vAECIUX73VhAAOP1T9rQToIm6azsdqH4u5pW1 qyhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MryeaLoj; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=7Njo6jTX; spf=pass (google.com: domain of linux-kernel+bounces-19822-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19822-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e20-20020a50d4d4000000b005519bcc5894si1603edj.591.2024.01.08.08.13.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 08:13:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19822-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MryeaLoj; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=7Njo6jTX; spf=pass (google.com: domain of linux-kernel+bounces-19822-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19822-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0322D1F2335E for ; Mon, 8 Jan 2024 16:13:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31F4A52F62; Mon, 8 Jan 2024 16:13:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MryeaLoj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="7Njo6jTX" 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 E1BDA524BE for ; Mon, 8 Jan 2024 16:13: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 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1704730411; 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=rvUicjBGSwsOvS9W+LrZ7jgrjMu62sy16+o7dUgEHbs=; b=MryeaLojWfH2yhRaf1vw56iklZGvdAIoTWIK4uXmq0UFT/0fq1C71Xsej8sJdx59PGmVcq uJL4HfJGyvYvZqt4/SaDtlv+KlPljsG8eAWeJtOBcdEHwKTxfbar2HorfgXKt7NbuBbWqH SAb/lGb+lrhpD6Sk4RGwsOYmA8yMJ/WFQi2b36x8er1y6ZrNVv6L4bHUErefYWJ66gn028 XOGUXIHU55bLuaQVeLy86oh3CtfYK7qE0VVyofUGUZ/t8VKd82EfxLYmke7/9C8G3CSJSQ 0Cjjgkx6qMUepfNcR5sc5vSK4VY0kwkw10ZF6iZY0t3D6+nY3JI2Iuq+3OpGLw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1704730411; 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=rvUicjBGSwsOvS9W+LrZ7jgrjMu62sy16+o7dUgEHbs=; b=7Njo6jTXxM6xfnG0RlXhzmcBIF3m+NX3FjEA5zX5dXqVKNXyl560bTdTrc6tMUFu9WZXNG PfCI5ezoB0p99FDQ== To: "Zhang, Rui" , "linux-kernel@vger.kernel.org" Cc: "jgross@suse.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: <871qarlvub.ffs@tglx> References: <20230807130108.853357011@linutronix.de> <20230807135028.381851690@linutronix.de> <7443f3200ef0be756566059e8c9b0657f3cefcff.camel@intel.com> <871qarlvub.ffs@tglx> Date: Mon, 08 Jan 2024 17:13:31 +0100 Message-ID: <87y1czkdlg.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 15:54, Thomas Gleixner wrote: > 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 rea= l 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 happe= ned 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() k= ernel, 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. In which order are the APICs/CPUs enumerated by ACPI?