Message ID | ZaTziftQSSg/v5Np@jeru.linux.bs1.fc.nec.co.jp |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-25764-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp1581017dyc; Mon, 15 Jan 2024 00:59:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1DVN10Ya6dCZxt9NGJ1KNTg2jvbSuO7Do2KAlGpCObwP8L6W5y2JX56IWi1mq7Do0G0U1 X-Received: by 2002:a05:6359:6483:b0:175:73d0:de68 with SMTP id si3-20020a056359648300b0017573d0de68mr1396452rwb.27.1705309165916; Mon, 15 Jan 2024 00:59:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705309165; cv=pass; d=google.com; s=arc-20160816; b=atFLZQSihFQuRwUjPqSUePNQeFkaAZXM3+Ov+dj/eujZLv80RBmiY18NCY9fXvRrZ3 ILHjwWfvkJ1fWomFtKyGybLRqb6VLwHBMUC61cYyuLGIgAADnEHwYDJxU+cJX9YevD/6 w3NtRfDvOe5xfZLCm9Bb7NkoYEJhTZRNlrKYmouETmS1afsIwprPPKv2baW4Wa6o6KXX ONOZ/pd1cJ+aVJ1qmnJKecY/mdSuX9rlXZW5A8HYwAVBG1xlmM9gKAePTwN0oQ8o+JmI aHRPXVfQjbefu+93cvejitayu7tCO4DZf7QvE2O6BpWhN+ma0GLTfSqjtF6FjKKJLRkl c+6A== 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 :content-transfer-encoding:content-id:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=Gfd3tb3MHJm1QZloPaleRRQUBcZ+caHeEImd7L+Z99Y=; fh=6P0fZ2UIdUqKRc2p6I3V7Uzcn+9uYDtJXeSfB81M9us=; b=xmj8Hf8Ln1/6NptqDmYReQoGWiopDpzhXwxH3Qw0ho8DToH2vSzSOpF/vIITL1cUPt rU84W6u8gNsp1RH2VpSQL4YqAP15iq1xp6Wsu4SF24UnSwL2IG7+dnaxwJUNoicqpZAi Z2XFRT7dYSPC6Jrnn4F9IP70/A/KgjIgCELutJXMAhQ3njlFwY6Dr5l55cUAYEhCFp/z y7/ENMpmkPK64EXvJr+VerkqHx1ojXMZwcY5uDkqhjcZF+Zk88XnJseRYYtCaOaiq+CW V/QrDoQpYGkVeV3MWHmrSVqw+YNmRl7dStepIMY/ZzrP8zmcCSs8IVU2cyb1l3HtNTh4 TPtw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nec.com header.s=selector2 header.b=lZr1hdGV; arc=pass (i=1 spf=pass spfdomain=nec.com dkim=pass dkdomain=nec.com dmarc=pass fromdomain=nec.com); spf=pass (google.com: domain of linux-kernel+bounces-25764-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25764-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=nec.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s202-20020a632cd3000000b005cf60fc5fc9si3680498pgs.274.2024.01.15.00.59.25 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 00:59:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25764-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@nec.com header.s=selector2 header.b=lZr1hdGV; arc=pass (i=1 spf=pass spfdomain=nec.com dkim=pass dkdomain=nec.com dmarc=pass fromdomain=nec.com); spf=pass (google.com: domain of linux-kernel+bounces-25764-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25764-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=nec.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 221ADB211B8 for <ouuuleilei@gmail.com>; Mon, 15 Jan 2024 08:58:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3221F4F0; Mon, 15 Jan 2024 08:57:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nec.com header.i=@nec.com header.b="lZr1hdGV" Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2049.outbound.protection.outlook.com [40.107.113.49]) (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 168FDBE74 for <linux-kernel@vger.kernel.org>; Mon, 15 Jan 2024 08:57:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nec.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nec.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mB3AmpTSQMhp99sOSDcizcRZajqSVT8yGKtT9YbW+4af+/XDnF/31jvxW6qIse6+2DA6VuhBtFu9F4vPoFu1jzz91Sq4+7HfTxtj7EDJAWuWOeWB7uzNlFDI7t9uurh6vBajDRZHI4NPmJk3BLziBlG74y1GNcKDiI4yiWNSBzcA9K/JJ7wIt9rrkf2Qc30TxDSx24sDZaJlF1fCiGpnl/ALEQzFW9Y/6E7ykQfQAyr8qFrTQOm5SP6cZKm5tL7A49vf11kxK+IVKiWYHMUSVUH6i9beeDYGou8CYS6rhCQBxbniRnBiwqU9S4kSq8Ql5WElJnAk3YTcIgWkTQ59dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Gfd3tb3MHJm1QZloPaleRRQUBcZ+caHeEImd7L+Z99Y=; b=KzBxL4LSh2A8hIV9J1PpPxX28u5RFy2xcoorYTa2QfZtffihGwFPWOJAQy7yYM0Mr4W3uag2X670zXdZmeztuMpOkKFk2zIPTWzvuXFHXCumH7huiPET3CL/nzp4qtivUsavtCVgKL5MK7FuMEe7LNEoZfc5viq8PNPkQ3yblMLwNQa62BeNavG8/LKWuA9e2bkDPsoujMsyiBMwSZqlIXuOyRv8W1hdIwdjeG7fhE0oHEXCKkLF7YtP9Puz9JV/hcjWnFFdgOl/E8g0w6EJuHriNca/CRffXR9cQtjQVuCfmiWtE2yabWa+XhjITYX6yR+lptwNGbXs85pCa6RTUg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nec.com; dmarc=pass action=none header.from=nec.com; dkim=pass header.d=nec.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nec.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Gfd3tb3MHJm1QZloPaleRRQUBcZ+caHeEImd7L+Z99Y=; b=lZr1hdGVFCIB8o6+v1544SbbAi4PPHfcRbFYnUh18RiBk3pSLP3ZGBJDkifczT605Ec4v598XH1RTjcg+MsmTBAMamV8vaLRvSsdJKU/cK9bPdmJXp/Jo/VDr8n3UdgF5FT2LskfpIORx4gw2NwxKW8tYknWAspVxMxXvi7/kmtp/B4hmPE3lmksl7vTYs2x8159McpzEcY742VcwzUIol23y8L6vyVQO6LTkiDMe7EDdl/f1Khm10303xfL/fkObbpgQWIsCHxF+TWJ1RdsRiiBHoG1lkMonpUP6P0nYyhcz2UKJ0tO8TSwMz+/BHR8VWvIMX0bLarLZop6uluoyQ== Received: from TYCPR01MB8389.jpnprd01.prod.outlook.com (2603:1096:400:15f::5) by TY3PR01MB9825.jpnprd01.prod.outlook.com (2603:1096:400:228::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.15; Mon, 15 Jan 2024 08:57:45 +0000 Received: from TYCPR01MB8389.jpnprd01.prod.outlook.com ([fe80::97b4:ef67:3174:a230]) by TYCPR01MB8389.jpnprd01.prod.outlook.com ([fe80::97b4:ef67:3174:a230%3]) with mapi id 15.20.7202.015; Mon, 15 Jan 2024 08:57:45 +0000 From: =?iso-2022-jp?b?Tk9NVVJBIEpVTklDSEkoGyRCTG5CPCEhPV8wbBsoQik=?= <junichi.nomura@nec.com> To: "kirill.shutemov@linux.intel.com" <kirill.shutemov@linux.intel.com>, "mingo@redhat.com" <mingo@redhat.com>, "tglx@linutronix.de" <tglx@linutronix.de>, "bp@alien8.de" <bp@alien8.de>, "dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>, "x86@kernel.org" <x86@kernel.org> CC: "hpa@zytor.com" <hpa@zytor.com>, "ardb@kernel.org" <ardb@kernel.org>, "david@redhat.com" <david@redhat.com>, "nikunj@amd.com" <nikunj@amd.com>, "thomas.lendacky@amd.com" <thomas.lendacky@amd.com>, "debarbos@redhat.com" <debarbos@redhat.com>, "jlelli@redhat.com" <jlelli@redhat.com>, "lgoncalv@redhat.com" <lgoncalv@redhat.com>, "dzickus@redhat.com" <dzickus@redhat.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: [PATCH v2] x86/boot: Add a message about ignored early NMIs Thread-Topic: [PATCH v2] x86/boot: Add a message about ignored early NMIs Thread-Index: AQHaR5Dobycx3oYC4EWPlFRq2PJefg== Date: Mon, 15 Jan 2024 08:57:45 +0000 Message-ID: <ZaTziftQSSg/v5Np@jeru.linux.bs1.fc.nec.co.jp> References: <ZaEe8FC767f+sxRQ@jeru.linux.bs1.fc.nec.co.jp> <20240112120616.5zjojjmjeqg5egb7@box> In-Reply-To: <20240112120616.5zjojjmjeqg5egb7@box> Accept-Language: ja-JP, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nec.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: TYCPR01MB8389:EE_|TY3PR01MB9825:EE_ x-ms-office365-filtering-correlation-id: 756fb568-fa2f-434f-f6e8-08dc15a80aaa x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RtTHnYoOH+u+Jy8oK/zbRH9Vb6HfJ8Cdn2cd7mM/C3EK6otKQ/R/GLZCX3r1jLJD7rUA53vK+qyw6tYk1R1xFvC/QVn7T9qsq4OrkYVHWiK4xMu/T3QMmwX9Ex7dSfOvxBJKapZJD6p2ck4eoyvdHkkC/SUwEPbcuTzcZUQo/GjK3RYovj8AaAV0jiZ2yDkZXM2ddw058Xg8jhCO2fKXTXP/iNUYW8O8cB3YBtGoOSDvgVuhJenrZlgeIi4f9zGZ0xLvIxNoSxMk4DhtABIB2vAdY5AvcojmQIvA2OgBV9pZ8ByaoR5kyFRMCBuoWk2Ybx93t4vYDjK9o1vb8h6R4q75zoV5wgT84u27mom4n8bztNIk4fxLmOxVLc7PeFn40B5SrRjKgZ19OSswuqI0RY9VDwp+TQCuS2+Pw2VerhIMpw/BAOh+iNGQd2N3y+J0Jevg+lvW6oRh7rAcNefUTPxr86/J+8WdINy3EnfB+ZU+bE30QqxgG5mJWgIpy3QTwrwQAPs4wB6zwDKNM4DPgECsGdG7vtMEMCxlouoJJKNwIgiJl/I/n748LF7ktHM4urbb3x2L7QOUQDtL5HVDpyBmqdThps9b7P/ng89g3/I= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB8389.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(136003)(396003)(366004)(376002)(346002)(230922051799003)(186009)(64100799003)(451199024)(1800799012)(71200400001)(38100700002)(966005)(6486002)(478600001)(82960400001)(122000001)(6506007)(15650500001)(83380400001)(9686003)(6512007)(2906002)(7416002)(316002)(5660300002)(86362001)(8676002)(8936002)(85182001)(4326008)(26005)(64756008)(38070700009)(66946007)(66446008)(54906003)(76116006)(66556008)(110136005)(66476007)(41300700001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?b?dDl1TG1hNlRpVmU0Qjhp?= =?iso-2022-jp?b?dVpQdjllQzJnMFM5dkxzTDdXQUhLZ05vNE1wNG9kdUNDSmVzMGFPdmQy?= =?iso-2022-jp?b?V1hqMWFlbWxScnRiQXFnSWNGWU5XU0dNNEZaYXJjbkpEN0pvUWtZNzlu?= =?iso-2022-jp?b?bHJ1UERJSnBUL3dVeXhNTUpDa3hqTnRENFR0YnU1OHdUcUlaRlZ5eGVD?= =?iso-2022-jp?b?djZRNnVoaVVoRG5sMStYb0hQSWJXQXY2Q1ptelZuTmdtM0IyYlNNM2JK?= =?iso-2022-jp?b?eUxpSzRVM3l0M3ZKQUxwVG54S2ROeHhLaGwvemNyODBoRkVZYS81ZXYz?= =?iso-2022-jp?b?eEtBUFpYNDUyR2s2Z2NZMk9ZWERXVzlVZGpQcVIvV0tIQXBCSkVibEY5?= =?iso-2022-jp?b?YnYrQU11RHBqNThJMGVSQ2R6TjJDZXFyVU5sOTFDblNLV3N4Yy9KMVhV?= =?iso-2022-jp?b?Q2JxTjMrN2dsblViNUV5S2UvTHpaeTJsaFhTcUZt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KWjBIa1F2V21mWHd1cmkva084bFBkRWwx?= =?iso-2022-jp?b?aVAxQWJFaExsQkE9PQ==?= Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <A263990B1F0AA340A33305BB220CD1D8@jpnprd01.prod.outlook.com> Content-Transfer-Encoding: quoted-printable 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 X-OriginatorOrg: nec.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB8389.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 756fb568-fa2f-434f-f6e8-08dc15a80aaa X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2024 08:57:45.6933 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e67df547-9d0d-4f4d-9161-51c6ed1f7d11 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3sd8H26Pv2AM9tTMMVdBVtlKLnttnd5ROPsDsDtberAzq1I3Ox+gdwoGeoQXDgZFHl8y1K9hiGDFCDZh7ghwDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB9825 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787882956933831228 X-GMAIL-MSGID: 1788146263594769638 |
Series |
[v2] x86/boot: Add a message about ignored early NMIs
|
|
Commit Message
NOMURA JUNICHI(野村 淳一)
Jan. 15, 2024, 8:57 a.m. UTC
Commit 78a509fba9c9 ("x86/boot: Ignore NMIs during very early boot") added
empty handler in early boot stage to avoid boot failure by spurious NMIs.
Add a diagnostic message in case we need to know whether early NMIs have
occurred and/or what happened to them.
Signed-off-by: Jun'ichi Nomura <junichi.nomura@nec.com>
Suggested-by: Borislav Petkov <bp@alien8.de>
Suggested-by: H. Peter Anvin <hpa@zytor.com>
Link: https://lore.kernel.org/lkml/20231130103339.GCZWhlA196uRklTMNF@fat_crate.local/
--
v2
* Moved variable declaration and definition to the right place
based on comments from Kirill.
No functional changes.
Comments
On Mon, Jan 15, 2024 at 08:57:45AM +0000, NOMURA JUNICHI(野村 淳一) wrote: > Commit 78a509fba9c9 ("x86/boot: Ignore NMIs during very early boot") added > empty handler in early boot stage to avoid boot failure by spurious NMIs. > > Add a diagnostic message in case we need to know whether early NMIs have > occurred and/or what happened to them. > > Signed-off-by: Jun'ichi Nomura <junichi.nomura@nec.com> > Suggested-by: Borislav Petkov <bp@alien8.de> > Suggested-by: H. Peter Anvin <hpa@zytor.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
On Mon, Jan 15, 2024 at 08:57:45AM +0000, NOMURA JUNICHI(野村 淳一) wrote: > + if (spurious_nmi_count) { > + error_putstr("Spurious early NMI ignored. Number of NMIs: 0x"); > + error_puthex(spurious_nmi_count); > + error_putstr("\n"); Uff, that's just silly: Spurious early NMIs ignored: 0x0000000000000017 Would you like to add a error_putnum() or so in a prepatch which would make this output Spurious early NMIs ignored: 23. ? So that it is human readable and doesn't make me wonder what that hex value is supposed to mean? Thx. Btw, please use this version when sending next time: --- From: =?UTF-8?q?NOMURA=20JUNICHI=28=E9=87=8E=E6=9D=91=20=E6=B7=B3=E4=B8=80?= =?UTF-8?q?=29?= <junichi.nomura@nec.com> Date: Mon, 15 Jan 2024 08:57:45 +0000 Subject: [PATCH] x86/boot: Add a message about ignored early NMIs Commit 78a509fba9c9 ("x86/boot: Ignore NMIs during very early boot") added an empty handler in early boot stage to avoid boot failure due to spurious NMIs. Add a diagnostic message to show when early NMIs have occurred and/or what happened to them. [ bp: Touchups. ] Suggested-by: Borislav Petkov <bp@alien8.de> Suggested-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Jun'ichi Nomura <junichi.nomura@nec.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Link: https://lore.kernel.org/lkml/20231130103339.GCZWhlA196uRklTMNF@fat_crate.local --- arch/x86/boot/compressed/ident_map_64.c | 2 +- arch/x86/boot/compressed/misc.c | 7 +++++++ arch/x86/boot/compressed/misc.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/x86/boot/compressed/ident_map_64.c b/arch/x86/boot/compressed/ident_map_64.c index ff09ca6dbb87..909f2a35b60c 100644 --- a/arch/x86/boot/compressed/ident_map_64.c +++ b/arch/x86/boot/compressed/ident_map_64.c @@ -389,5 +389,5 @@ void do_boot_page_fault(struct pt_regs *regs, unsigned long error_code) void do_boot_nmi_trap(struct pt_regs *regs, unsigned long error_code) { - /* Empty handler to ignore NMI during early boot */ + spurious_nmi_count++; } diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index b99e08e6815b..e7f4eb24a9a4 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c @@ -52,6 +52,7 @@ struct port_io_ops pio_ops; memptr free_mem_ptr; memptr free_mem_end_ptr; +int spurious_nmi_count; static char *vidmem; static int vidport; @@ -493,6 +494,12 @@ asmlinkage __visible void *extract_kernel(void *rmode, unsigned char *output) /* Disable exception handling before booting the kernel */ cleanup_exception_handling(); + if (spurious_nmi_count) { + error_putstr("Spurious early NMIs ignored: 0x"); + error_puthex(spurious_nmi_count); + error_putstr("\n"); + } + return output + entry_offset; } diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h index bc2f0f17fb90..b858d6aa648c 100644 --- a/arch/x86/boot/compressed/misc.h +++ b/arch/x86/boot/compressed/misc.h @@ -59,6 +59,7 @@ extern char _head[], _end[]; /* misc.c */ extern memptr free_mem_ptr; extern memptr free_mem_end_ptr; +extern int spurious_nmi_count; void *malloc(int size); void free(void *where); void __putstr(const char *s);
> From: Borislav Petkov <bp@alien8.de> > On Mon, Jan 15, 2024 at 08:57:45AM +0000, NOMURA JUNICHI(野村 淳一) wrote: > > + if (spurious_nmi_count) { > > + error_putstr("Spurious early NMI ignored. Number of NMIs: 0x"); > > + error_puthex(spurious_nmi_count); > > + error_putstr("\n"); > > Uff, that's just silly: > > Spurious early NMIs ignored: 0x0000000000000017 > > Would you like to add a error_putnum() or so in a prepatch which would > make this output > > Spurious early NMIs ignored: 23. > > ? > > So that it is human readable and doesn't make me wonder what that hex > value is supposed to mean? Yes, it would be nicer to print that way. I used the existing error_puthex() just to keep the patch minimal. I will try to add error_putnum(). > Btw, please use this version when sending next time: Thank you. -- Jun'ichi Nomura, NEC Corporation / NEC Solution Innovators, Ltd.
On 1/24/24 03:44, NOMURA JUNICHI(野村 淳一) wrote: >> From: Borislav Petkov <bp@alien8.de> >> On Mon, Jan 15, 2024 at 08:57:45AM +0000, NOMURA JUNICHI(野村 淳一) wrote: >>> + if (spurious_nmi_count) { >>> + error_putstr("Spurious early NMI ignored. Number of NMIs: 0x"); >>> + error_puthex(spurious_nmi_count); >>> + error_putstr("\n"); >> >> Uff, that's just silly: >> >> Spurious early NMIs ignored: 0x0000000000000017 >> >> Would you like to add a error_putnum() or so in a prepatch which would >> make this output >> >> Spurious early NMIs ignored: 23. >> >> ? >> >> So that it is human readable and doesn't make me wonder what that hex >> value is supposed to mean? > > Yes, it would be nicer to print that way. I used the existing error_puthex() just > to keep the patch minimal. I will try to add error_putnum(). > >> Btw, please use this version when sending next time: > Here is a *completely* untested patch for you... -hpa
> From: H. Peter Anvin <hpa@zytor.com> > On 1/24/24 03:44, NOMURA JUNICHI(野村 淳一) wrote: > >> From: Borislav Petkov <bp@alien8.de> > >> On Mon, Jan 15, 2024 at 08:57:45AM +0000, NOMURA JUNICHI(野村 淳一) wrote: > >>> + if (spurious_nmi_count) { > >>> + error_putstr("Spurious early NMI ignored. Number of NMIs: 0x"); > >>> + error_puthex(spurious_nmi_count); > >>> + error_putstr("\n"); > >> > >> Uff, that's just silly: > >> > >> Spurious early NMIs ignored: 0x0000000000000017 > >> > >> Would you like to add a error_putnum() or so in a prepatch which would > >> make this output > >> > >> Spurious early NMIs ignored: 23. > >> > >> ? > >> > >> So that it is human readable and doesn't make me wonder what that hex > >> value is supposed to mean? > > > > Yes, it would be nicer to print that way. I used the existing error_puthex() just > > to keep the patch minimal. I will try to add error_putnum(). > > > >> Btw, please use this version when sending next time: > > Here is a *completely* untested patch for you... Ah, I was preparing decimal only version but yours is much better. I tested and it just works. I would like to use yours as a prepatch. May I have your signed-off-by? -- Jun'ichi Nomura, NEC Corporation / NEC Solution Innovators, Ltd.
On January 25, 2024 6:15:15 PM PST, "NOMURA JUNICHI(野村 淳一)" <junichi.nomura@nec.com> wrote: >> From: H. Peter Anvin <hpa@zytor.com> >> On 1/24/24 03:44, NOMURA JUNICHI(野村 淳一) wrote: >> >> From: Borislav Petkov <bp@alien8.de> >> >> On Mon, Jan 15, 2024 at 08:57:45AM +0000, NOMURA JUNICHI(野村 淳一) wrote: >> >>> + if (spurious_nmi_count) { >> >>> + error_putstr("Spurious early NMI ignored. Number of NMIs: 0x"); >> >>> + error_puthex(spurious_nmi_count); >> >>> + error_putstr("\n"); >> >> >> >> Uff, that's just silly: >> >> >> >> Spurious early NMIs ignored: 0x0000000000000017 >> >> >> >> Would you like to add a error_putnum() or so in a prepatch which would >> >> make this output >> >> >> >> Spurious early NMIs ignored: 23. >> >> >> >> ? >> >> >> >> So that it is human readable and doesn't make me wonder what that hex >> >> value is supposed to mean? >> > >> > Yes, it would be nicer to print that way. I used the existing error_puthex() just >> > to keep the patch minimal. I will try to add error_putnum(). >> > >> >> Btw, please use this version when sending next time: >> >> Here is a *completely* untested patch for you... > >Ah, I was preparing decimal only version but yours is much better. >I tested and it just works. > >I would like to use yours as a prepatch. May I have your signed-off-by? > >-- >Jun'ichi Nomura, NEC Corporation / NEC Solution Innovators, Ltd. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
diff --git a/arch/x86/boot/compressed/ident_map_64.c b/arch/x86/boot/compressed/ident_map_64.c --- a/arch/x86/boot/compressed/ident_map_64.c +++ b/arch/x86/boot/compressed/ident_map_64.c @@ -390,4 +390,5 @@ void do_boot_page_fault(struct pt_regs *regs, unsigned long error_code) void do_boot_nmi_trap(struct pt_regs *regs, unsigned long error_code) { /* Empty handler to ignore NMI during early boot */ + spurious_nmi_count++; } diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c @@ -52,6 +52,7 @@ struct port_io_ops pio_ops; memptr free_mem_ptr; memptr free_mem_end_ptr; +int spurious_nmi_count; static char *vidmem; static int vidport; @@ -493,6 +494,12 @@ asmlinkage __visible void *extract_kernel(void *rmode, unsigned char *output) /* Disable exception handling before booting the kernel */ cleanup_exception_handling(); + if (spurious_nmi_count) { + error_putstr("Spurious early NMI ignored. Number of NMIs: 0x"); + error_puthex(spurious_nmi_count); + error_putstr("\n"); + } + return output + entry_offset; } diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h --- a/arch/x86/boot/compressed/misc.h +++ b/arch/x86/boot/compressed/misc.h @@ -59,6 +59,7 @@ extern char _head[], _end[]; /* misc.c */ extern memptr free_mem_ptr; extern memptr free_mem_end_ptr; +extern int spurious_nmi_count; void *malloc(int size); void free(void *where); void __putstr(const char *s);