Message ID | 20240227212452.3228893-18-kirill.shutemov@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-84047-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3065691dyb; Tue, 27 Feb 2024 17:10:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWJZbTpH6gh31u4ALy87CAiFefEzHdxpIMWy0CoU8MRWqjaWfvlvBHBUJ3OvdO9awo8Yh85UbaR029k5ZzMDaD+s/urRg== X-Google-Smtp-Source: AGHT+IGjovuchXEmbCLB689puinKX0IQ9reEyaMmu5AaNmj1fqmhLAwKgmowhlZzSHSfu7l8cwG4 X-Received: by 2002:a9d:73d5:0:b0:6e2:bf19:194e with SMTP id m21-20020a9d73d5000000b006e2bf19194emr12748895otk.19.1709082605947; Tue, 27 Feb 2024 17:10:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709082605; cv=pass; d=google.com; s=arc-20160816; b=a/r5HzZmd8OByw89aWAW1DR2vqBx+2sqGCJLsRgNcP1U9MzQopCukGp8W3ii4h55q2 QZHAGa9sDtnm+Wga1Nq1xelMVt5AupFHE20TX4mw1M5427lQLtKdCO8hBflvE64n+z51 XaOPClzkzxxGNEiGAnd9LFcot/h04w4ZPZVvqdY0yR5+LrmaUgJuN9o1ym+wswM/srBG hH7QuAR+Gbd2ZLXo26SmaT8vwwK9irkJPmQ8XDtHidl1F8ZEEvgOeVj9v74fEACozl39 p/EKQ/Ej757dhhRkqNo03kYB8lJkwcxV25k/nnguWVyzwWUgQ9cOSUIQMisMB9Th30bD xaBg== ARC-Message-Signature: i=2; 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=XRCAUvp8NBcMzHdjO9AXsmx8/AFSPxWuHFPr/8cJPHg=; fh=OvJRnOqsMTm9XoNmEwebcqh9Ud7yh1CTeKAP84ols98=; b=t5A53uoB3vAJRWr8LPlmbyZ64vmTchFych8LrrJ01jfsnBADo3LnJfnIwlB8+zYVbn gwNbcHmWITKqI6IMPCx+lTpq/BnQ8hVc4+ypk6s+zeb6BtyVxyL2LrrrsFyXbnHlRNSL +rQW8q9P160zR+P9v/Uir7wDV2TIsDjt+Ys79G5/Jjq/5lqsQSayoiyosNaYli9UEZyS wAfec0XmhcFYjR1SvB1jX5/PMENJ50ImLd3uUWKdXzTNpykCme8Z0EqBMEbDg/C66JL8 FQbjX5j4u5GlW+SgOyS+8WQW5Zhm5DmF+RiqdHi3FVVrP0RVprHulFYDZy0OHWmppy2L Pw7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Tt2G7iS6; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-84047-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84047-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k72-20020a636f4b000000b005dcc035ca8fsi6315541pgc.561.2024.02.27.17.10.05 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 17:10:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84047-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Tt2G7iS6; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-84047-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84047-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C9734B2B66A for <ouuuleilei@gmail.com>; Tue, 27 Feb 2024 21:29:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2964F15B11A; Tue, 27 Feb 2024 21:25:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Tt2G7iS6" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (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 74AB615A493 for <linux-kernel@vger.kernel.org>; Tue, 27 Feb 2024 21:25:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709069121; cv=none; b=Jm3i8XuzpQ1/DMLLk7KEorR95awqrxlGT5Z+M7aPj2HnaCEJ187x5SUiaMJqrw6TLrAxzdu+7llxdB6xCA6+iz7QwGSHNnMwmxyxOXtLLxxN+5abyNXdLf/jDDAMDwweyquTwJaXSZxdpkYBkG6XVtJjRPgRj9e6LE+4j22l7nU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709069121; c=relaxed/simple; bh=210lCphqYKumbsSKrHahIq5zl6lhgbzI8RmOuXqd25g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SXVS6MB+fMrQODa7N+/jPA75WO+V+w55J09PJmZYXEndRgGTHheemnqymOcHAO1/hGfiHAgJrl4k6kXJYoq/4GGZbAbawo5WEH0uygZyXXpWKl3RXTr5e9JluqzRs/+A7+KUcQibMBClbmX0kJ/E6tIxx3v905u/A3926TjH3DY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.helo=mgamail.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Tt2G7iS6; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.helo=mgamail.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709069120; x=1740605120; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=210lCphqYKumbsSKrHahIq5zl6lhgbzI8RmOuXqd25g=; b=Tt2G7iS6HS3REwU32awORFUUG1ePAAHoJNiQ9/dzgavUkMOG9NXvxze9 xumD8xsUcUdjGi72iQKS9SaA5Xf8CASphpS2UDkubZZu1XKWIkpXuNGH6 2dYdyzRz54OEMGr31pwtNGGBCUODzj9RbWigQZh8i25h//ouZY3ywLwxe bywJqsRqKtzLiALHv3lnGotYqGv3pOt83jNjxRYfup6Naz8K2xZYq4Xar 3lfQm2k0lbKLk2lAcym3rJ6CHmyn4E+pRBkncIq1Htn0ukp/ndk2cLQ8h 7yuUGjsFaCMB1iz9awpChBGkZB9CQnWiK90x7wpUS3dQm3twuiTEmzVk1 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10996"; a="3567091" X-IronPort-AV: E=Sophos;i="6.06,188,1705392000"; d="scan'208";a="3567091" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2024 13:25:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10996"; a="937032929" X-IronPort-AV: E=Sophos;i="6.06,188,1705392000"; d="scan'208";a="937032929" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 27 Feb 2024 13:25:08 -0800 Received: by black.fi.intel.com (Postfix, from userid 1000) id C91C61210; Tue, 27 Feb 2024 23:24:56 +0200 (EET) From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, x86@kernel.org Cc: "Rafael J. Wysocki" <rafael@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Adrian Hunter <adrian.hunter@intel.com>, Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>, Elena Reshetova <elena.reshetova@intel.com>, Jun Nakajima <jun.nakajima@intel.com>, Rick Edgecombe <rick.p.edgecombe@intel.com>, Tom Lendacky <thomas.lendacky@amd.com>, "Kalra, Ashish" <ashish.kalra@amd.com>, Sean Christopherson <seanjc@google.com>, "Huang, Kai" <kai.huang@intel.com>, Baoquan He <bhe@redhat.com>, kexec@lists.infradead.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Subject: [PATCHv8 17/17] ACPI: tables: Print MULTIPROC_WAKEUP when MADT is parsed Date: Tue, 27 Feb 2024 23:24:52 +0200 Message-ID: <20240227212452.3228893-18-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240227212452.3228893-1-kirill.shutemov@linux.intel.com> References: <20240227212452.3228893-1-kirill.shutemov@linux.intel.com> 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 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792091626661851428 X-GMAIL-MSGID: 1792103002750026623 |
Series |
x86/tdx: Add kexec support
|
|
Commit Message
Kirill A. Shutemov
Feb. 27, 2024, 9:24 p.m. UTC
When MADT is parsed, print MULTIPROC_WAKEUP information: ACPI: MP Wakeup (version[1], mailbox[0x7fffd000], reset[0x7fffe068]) This debug information will be very helpful during bring up. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Reviewed-by: Baoquan He <bhe@redhat.com> --- drivers/acpi/tables.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Comments
On Wed, Feb 28, 2024 at 11:08:38AM +1300, Huang, Kai wrote: > > > On 28/02/2024 10:24 am, Kirill A. Shutemov wrote: > > When MADT is parsed, print MULTIPROC_WAKEUP information: > > > > ACPI: MP Wakeup (version[1], mailbox[0x7fffd000], reset[0x7fffe068]) > > > > This debug information will be very helpful during bring up. > > > > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> > > Reviewed-by: Baoquan He <bhe@redhat.com> > > --- > > drivers/acpi/tables.c | 14 ++++++++++++++ > > 1 file changed, 14 insertions(+) > > > > diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c > > index b07f7d091d13..c59a3617bca7 100644 > > --- a/drivers/acpi/tables.c > > +++ b/drivers/acpi/tables.c > > @@ -198,6 +198,20 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) > > } > > break; > > + case ACPI_MADT_TYPE_MULTIPROC_WAKEUP: > > + { > > + struct acpi_madt_multiproc_wakeup *p = > > + (struct acpi_madt_multiproc_wakeup *)header; > > + u64 reset_vector = 0; > > + > > + if (p->version >= ACPI_MADT_MP_WAKEUP_VERSION_V1) > > + reset_vector = p->reset_vector; > > + > > + pr_debug("MP Wakeup (version[%d], mailbox[%#llx], reset[%#llx])\n", > > + p->version, p->mailbox_address, reset_vector); > > + } > > + break; > > + > > Hmm.. I hate to say, but maybe it is better to put this patch at some early > place in this series w/o mailbox version and reset_vector, and add > incremental changes where mailbox/reset_vector is introduced in this series. > > The advantage is in this way someone can just backport this patch to the old > kernel if they care -- this should be part of commit f39642d0dbacd > ("x86/acpi/x86/boot: Add multiprocessor wake-up support") anyway. It is not subject for backporting. It is just a cosmetics fix (or debug facility). Any new MADT type would generate a warning. Nothing wrong with it.
On 29/02/2024 4:22 am, Kirill A. Shutemov wrote: > On Wed, Feb 28, 2024 at 11:08:38AM +1300, Huang, Kai wrote: >> >> >> On 28/02/2024 10:24 am, Kirill A. Shutemov wrote: >>> When MADT is parsed, print MULTIPROC_WAKEUP information: >>> >>> ACPI: MP Wakeup (version[1], mailbox[0x7fffd000], reset[0x7fffe068]) >>> >>> This debug information will be very helpful during bring up. >>> >>> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> >>> Reviewed-by: Baoquan He <bhe@redhat.com> >>> --- >>> drivers/acpi/tables.c | 14 ++++++++++++++ >>> 1 file changed, 14 insertions(+) >>> >>> diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c >>> index b07f7d091d13..c59a3617bca7 100644 >>> --- a/drivers/acpi/tables.c >>> +++ b/drivers/acpi/tables.c >>> @@ -198,6 +198,20 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) >>> } >>> break; >>> + case ACPI_MADT_TYPE_MULTIPROC_WAKEUP: >>> + { >>> + struct acpi_madt_multiproc_wakeup *p = >>> + (struct acpi_madt_multiproc_wakeup *)header; >>> + u64 reset_vector = 0; >>> + >>> + if (p->version >= ACPI_MADT_MP_WAKEUP_VERSION_V1) >>> + reset_vector = p->reset_vector; >>> + >>> + pr_debug("MP Wakeup (version[%d], mailbox[%#llx], reset[%#llx])\n", >>> + p->version, p->mailbox_address, reset_vector); >>> + } >>> + break; >>> + >> >> Hmm.. I hate to say, but maybe it is better to put this patch at some early >> place in this series w/o mailbox version and reset_vector, and add >> incremental changes where mailbox/reset_vector is introduced in this series. >> >> The advantage is in this way someone can just backport this patch to the old >> kernel if they care -- this should be part of commit f39642d0dbacd >> ("x86/acpi/x86/boot: Add multiprocessor wake-up support") anyway. > > It is not subject for backporting. It is just a cosmetics fix (or debug > facility). Any new MADT type would generate a warning. Nothing wrong with > it. > OK fine to me. Thanks.
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index b07f7d091d13..c59a3617bca7 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -198,6 +198,20 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) } break; + case ACPI_MADT_TYPE_MULTIPROC_WAKEUP: + { + struct acpi_madt_multiproc_wakeup *p = + (struct acpi_madt_multiproc_wakeup *)header; + u64 reset_vector = 0; + + if (p->version >= ACPI_MADT_MP_WAKEUP_VERSION_V1) + reset_vector = p->reset_vector; + + pr_debug("MP Wakeup (version[%d], mailbox[%#llx], reset[%#llx])\n", + p->version, p->mailbox_address, reset_vector); + } + break; + case ACPI_MADT_TYPE_CORE_PIC: { struct acpi_madt_core_pic *p = (struct acpi_madt_core_pic *)header;