Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1048628rdd; Wed, 10 Jan 2024 07:14:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHgfYZtq7pRmPl8NZeRW1YrfCk0eSIAZpg5rs8POSuIVQGY94XJawXYm5G9Ejg6mnyjwMHU X-Received: by 2002:a05:6a00:2f09:b0:6d9:d6d0:b8ef with SMTP id fe9-20020a056a002f0900b006d9d6d0b8efmr1144299pfb.22.1704899665459; Wed, 10 Jan 2024 07:14:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704899665; cv=none; d=google.com; s=arc-20160816; b=V157BcI/OpvHu9Su6/Fa+pmFxrOwLN+5jPpG8PVi8COM7e207HZ5vsnc5srmksPusi Tq89fRQzexM4IUJQE43CMHP4VwLfO+sTbs3WxgTwUTUI9FCEGqTXAfFeZWrR6PqhHi9k /jWpeN8wUBZNAAL0BM551kw/CxZTBFZSwW4O8F5wqD9H1bxgSrvUmIuKxWTDQuKB0U3l MjBZJ1SItVZecd0qa5CEe/ZWrpBkbbwgdMMcw015p/F9DRFmJZpU1vP4JnOxhny51vU3 xK19XfLPPH6HkJ7c8OCSX28nlAsqX1HtxvMQBUDDB+QV3/DoMqrDifGERo+yHO2qwcC+ eueA== ARC-Message-Signature: i=1; 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=z3Tnc1ILZ8kuCVeR+O8VbXlDICoScGjA2e2mKdX+Ii4=; fh=zHzFrmzolYmif7SyKldWeY2tQID2XBcZwdIL8gsVpIQ=; b=UwzTwfRM3vmKUD6sPNCo48awSeKSuQ8WEsyTkOzgk/QLQeDREvCxUJv7DrquQ7Anu3 CymyrJl78tnGyh1nBIIUC6qLzlVDRkPW/vmaRZ59lanzwCwu3FhLUNQyFBBFGWFzrqzu A28IkjuH7JIn1+ZCoPf4KsEya+smIm/6uyttQBiDJkt3UzfZjLm/j5GlRRISl4W6IGw7 liw4nUOaaOfXvahTnzJVK/WnCoOye2Akj5kYYoleHNJJSfSyvBpV4RLwHcAne6bT9BtJ 6xYUXfo3cQxCWYpRXFo9EI9gAFEFuHKXZqgVUFla1ZQ/dKk+9IMxuVGLsc1aRpkRPBHO xQgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linutronix.de header.s=2020 header.b=TU9tom3t; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=LE8tyCvo; spf=pass (google.com: domain of linux-kernel+bounces-22403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22403-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g11-20020a63564b000000b005cdc081bd32si3752537pgm.646.2024.01.10.07.14.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 07:14:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22403-linux.lists.archive=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=neutral (body hash did not verify) header.i=@linutronix.de header.s=2020 header.b=TU9tom3t; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=LE8tyCvo; spf=pass (google.com: domain of linux-kernel+bounces-22403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22403-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (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 8BBCE287FFD for ; Wed, 10 Jan 2024 15:14:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C549F4BAB7; Wed, 10 Jan 2024 15:14:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="TU9tom3t"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LE8tyCvo" 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 AF0EE4A99D for ; Wed, 10 Jan 2024 15:14:17 +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=1704899655; 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=DYxPD8fW6h0wbUUVw6JrkcqjQHlAPF5MkYZvHwp5j/I=; b=TU9tom3tTpdrkhNIJmNMPy4y9LPdmMMSH8yUM2P8PmJLU5qUEodyIh/PEZsMJBCerSJnAC gBzL+5wj9416oW7jUHqqZJbrkzGiOTWJq0wd0j4emI/wlpq7JOAZuYOyJbAbHKYEuwQGef vl57Rk6mBG7PZFbINihwfqzMkkUpVd+jemUz5rjXHYipmAGPqYuyHjeVMw0Ca0O3qz7Qcp x+cyCvcRDEVIOi3IOwqMfYHlWHeTdEOdFlsMrNl6n9rWsVtESqyggtUd8za/1plTEpHRgI 3HoKbFSGy73uKQ1W/S0PbQH32UNZtN8IeQbFqlLmWkAsG0UlMSwjCNgIm2IOHA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1704899655; 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=DYxPD8fW6h0wbUUVw6JrkcqjQHlAPF5MkYZvHwp5j/I=; b=LE8tyCvoVRPo6vazb4xNYFvY4Hkp5+yJNjMVDjlxDfjFihA9xBiQQoSvzM5Oc8b6BT9kKU jss/dlBJ4tMtoHBw== To: "Zhang, Rui" , "linux-kernel@vger.kernel.org" Cc: "jgross@suse.com" , "x86@kernel.org" , "arjan@linux.intel.com" , "kprateek.nayak@amd.com" , "Tang, Feng" , "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" Subject: Re: [patch 37/53] x86/cpu: Detect real BSP on crash kernels In-Reply-To: <87frz5jmnl.ffs@tglx> References: <20230807130108.853357011@linutronix.de> <20230807135028.381851690@linutronix.de> <7443f3200ef0be756566059e8c9b0657f3cefcff.camel@intel.com> <871qarlvub.ffs@tglx> <87y1czkdlg.ffs@tglx> <87frz5jmnl.ffs@tglx> Date: Wed, 10 Jan 2024 16:14:15 +0100 Message-ID: <87a5pdjk54.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 Wed, Jan 10 2024 at 15:19, Thomas Gleixner wrote: >> This is the order in MADT, >> $ cat apic.dsl | grep x2Apic >> [030h 0048 4] Processor x2Apic ID : 00000010 >> [040h 0064 4] Processor x2Apic ID : 00000011 .. >> and this is the order in Linux (from CPU0 to CPUN) >> x2APIC ID of logical processor = 0x20 (32) >> x2APIC ID of logical processor = 0x10 (16) > > What a mess... And clearly not according to the spec "The second is that platform firmware should list the boot processor as the first processor entry in the MADT." Oh well. There are reasons why this is written the way it is.