Message ID | ZaEe8FC767f+sxRQ@jeru.linux.bs1.fc.nec.co.jp |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-24606-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp101284dyc; Fri, 12 Jan 2024 03:14:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IEddUAVQevt9YKgbYrtonck/X4sLsMZJkjF3t7C1wlr27cr2JTtXUn7lzHUimu3ExlXOCst X-Received: by 2002:a17:90a:fe8a:b0:28d:fdab:dde2 with SMTP id co10-20020a17090afe8a00b0028dfdabdde2mr1037387pjb.94.1705058057187; Fri, 12 Jan 2024 03:14:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705058057; cv=pass; d=google.com; s=arc-20160816; b=0gy7jSaUHmTJSlww8+2PTAzFcwYWSSBNQbnS5OyXwJ/cZl9tBRmDD5ATr8B28N8F+2 +32UyHeBvdPPGx3cafETrsZS88qbvPhLJWT/LxlMwm0bVaxKGBGfX5zJb8DB/v08c6y+ T5tRAyoySeQH8AAe/HF7ql5LZsxPRchchDjz6Yw1wvQOBKxQDTB8GY0V4N5dfzyZuKHY nNTWm3wKoK/Cv3ciPLEUxje8dGNq0Yl2gb4hjz0p5IypHZfi9GBmzPN9zLNZVH7W7bof WR7atLBMYV8c+cJF5Lm7IsHmpABI+4EghOVCimZzVQYjAijOPNAUTI993Ybad09CML0C qbIw== 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:message-id:date:thread-index:thread-topic:subject :cc:to:from:dkim-signature; bh=se8IQa1LA7gMOrBE/V4zvoFHnQeE8/XXodFUi5fsZ8U=; fh=FdiOYi7qnXt73TMeghAfqA175SiW0DV/wLsr01DakM0=; b=Jwvc3LbyGnkE+BlyKhEoepUaBkb4osMQothYKb3QY90zXhQ3shQTulh6vsX0q6r4n9 8vP4hY/iobbAtQ2YWDgu02GEje28b9qLgsQxhn862+r9bO1gvr1Kgu2vI0YrzQRzfsZT pXsS8QHZpeMkcPAR7+EzFhm1vMxVy4sCQRVtQg/Ih5xRxJOl35BgNmcTYfY7nTAkc2qP gQGvVWofi1J8XhO0nFsEy//hloY0dfpiQk9LQEdzvmzSY2m/DoTYlMycpKCAg1ZCGYQf cC5X1K/qTfKv5S9HvBi+4WIVsqwZdql14mm9b33ILIYs9lzCLsjMxqt95JZ4ZIxL/QbA QgLA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nec.com header.s=selector2 header.b=oUqnDDJC; 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-24606-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24606-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=nec.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ne5-20020a17090b374500b0028db1b80e4asi2969649pjb.61.2024.01.12.03.14.17 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 03:14:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24606-ouuuleilei=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=pass header.i=@nec.com header.s=selector2 header.b=oUqnDDJC; 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-24606-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24606-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id ECC012838E8 for <ouuuleilei@gmail.com>; Fri, 12 Jan 2024 11:14:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0017F67E81; Fri, 12 Jan 2024 11:14:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nec.com header.i=@nec.com header.b="oUqnDDJC" Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2069.outbound.protection.outlook.com [40.107.114.69]) (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 548FD67E60 for <linux-kernel@vger.kernel.org>; Fri, 12 Jan 2024 11:13:55 +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=cN8uNpBQUGV2l6ZNo5v0rF5nZ4CGGtp2S46Zh0Ff4meybIs5OtCIgulaMDvy80CMenqF2a6ZVYiOiRz4vR12euBOY+pMUJgJZzkoFE+pD6jTGrQlCKlkzWhKpwTKNPFHjIcR5Hpi4noBy0fhMqvminye5OVMdmCvxcEyADKeVuGW2mxviWj8j0aDti7ezWhuNa3Btp4+klm1HJ1Fmjl9B6OJ8xxcv9cetcfbd10E3x+d8klgVzffQfaDhsSjbv36JqBCblWhzsEsXvRSlmfW1JRd85+2+kTOrHebXc7wNg6PGTiOYNXDpEnQ7Ksf9ZL2Epax3sn50qrpZKLvENObqw== 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=se8IQa1LA7gMOrBE/V4zvoFHnQeE8/XXodFUi5fsZ8U=; b=g4wdDosZVv0XYi9OUjdwysTshCIxrUeaiV1abwcMJbM2PnN0MJqel8GFebetapNL/ey8nbC2hYuPGpIxha2LxcJbFgD/YXfmyzBwU/hjP6+SLVK+OxYlDEbkfkO8mL/dpmdWqq0gTH7Dk3r1ivgE9J42/7ljKIsYv1gK6rd8suSV0J6+PgwBhOKHttHvQ5eR0ydevka9166LMz9WVE1SCCDDucWgO1vG3WGh9kW7jTPo0aEdl97cZ2ipxSppMvf82NXiUNUpge07dnbYpo8dyxFnXrL5jbrr7zWi/bbyO0uQi+2V5L8HowL07Mhs76116dAa0uxpPzMWspacSOCmEw== 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=se8IQa1LA7gMOrBE/V4zvoFHnQeE8/XXodFUi5fsZ8U=; b=oUqnDDJC48uslqIb81gRdFP0DhHM3CgcmDAhsdAef0wPHPgCZ61BmWa6a0Q8RN6mEAmk2qRZXiS6yzD5s6hGYN4fIaVNwBLWuMuYNC22wi/O6JJCtxGK3Dy21Szs6vQ7ex7Zli688a9bc+W5XizDt/uEXgg3ni8P6WFzUQ7vCR87nNVCPQAGsqUq/xQiN22Lj/Sf5iiiYhcQXKrZqyz8RwSfxhpOVN8s8HTO0DZcHKz7CDyHIPlLEsn3DWKFGiWtQri6pfhO8d+feM7STRkvxWD0wR/Ip3YUmeMY/79mBZtYRU1jlDZZh0ZXIiocJqB1HylDIKcmT5PyOs4WcD0B8g== Received: from TYCPR01MB8389.jpnprd01.prod.outlook.com (2603:1096:400:15f::5) by TYWPR01MB8696.jpnprd01.prod.outlook.com (2603:1096:400:17c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.14; Fri, 12 Jan 2024 11:13:53 +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.014; Fri, 12 Jan 2024 11:13:53 +0000 From: =?iso-2022-jp?b?Tk9NVVJBIEpVTklDSEkoGyRCTG5CPCEhPV8wbBsoQik=?= <junichi.nomura@nec.com> To: "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>, "kirill.shutemov@linux.intel.com" <kirill.shutemov@linux.intel.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 repost] x86/boot: Add a message about ignored early NMIs Thread-Topic: [PATCH repost] x86/boot: Add a message about ignored early NMIs Thread-Index: AQHaRUhttMsB94tJmUuDDAl0tLENcQ== Date: Fri, 12 Jan 2024 11:13:53 +0000 Message-ID: <ZaEe8FC767f+sxRQ@jeru.linux.bs1.fc.nec.co.jp> 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_|TYWPR01MB8696:EE_ x-ms-office365-filtering-correlation-id: 37fcad32-6847-4ff9-e3b4-08dc135f8fb4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tD4L3sH++MxHY20X7SqKThf6F6k2K1b9r6ShjfuTwmSwPar5yRThQV8KqnQM9+VbT256v8RT23lSHscn/xYbWTaJdKnpCPcJu0Kg5pcW1lnRqxRTF1QFe3G+vOudOzHrugRPkDDu69oXhp8FqC8Dt9FE/s4N2mVxCeGHTyOZ7k1a1rEqLT2mV4Ikn8zN1VAjulOS8ZHJOwEaO28G37WfzGFSMvOcitJegJSuEJXmytnNdiiovJwh/vLyuuSR+Vtn23x6E7OSp8fqBRtRPjTeuLEeiTZlCDvgw8bC0GmP32tSEuTHFrrMBO6OZ2X3qt7jTJiWsPMsrjaAr1wK5gYj4rVr514MYt5Js/Q0foSwJ2AGn4kC2+KmEAqg35grO0BzyZHvdfK+8iYXMVhVe9Zzx9F3uxeSFo21f4BgppfPegBF0anGysjRQFK7w/qXpOJLfI1+g56SM15WvqmV1hRbrE13/V5tacl1XKfs4aAY/kOnUGHNQ+9PLU0vOgtDJRXBcV6+z1skI9xZbVkqB/xWfeQ8RGkwwlD+nfaSH8OtEThye2HB9eE33W9dUWQstWtuQov7wwtIwnx8HQnqNqRK+SN/8UuXpKJ0T38RGfawNt4m9cgCzq9PZ7zHOmTCnK/v 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)(346002)(396003)(376002)(366004)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(966005)(6486002)(6512007)(6506007)(55236004)(71200400001)(26005)(85182001)(83380400001)(38070700009)(38100700002)(86362001)(122000001)(82960400001)(41300700001)(9686003)(478600001)(8936002)(15650500001)(8676002)(4326008)(5660300002)(66946007)(66476007)(66556008)(110136005)(76116006)(316002)(2906002)(66446008)(7416002)(54906003)(64756008)(67856001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?b?aTNQaFpxdW42U3JiZW9W?= =?iso-2022-jp?b?SFBJbzVHU3dMWlhHKy9wNHlYeUttcUszRmtsc1l4RkdBV2ZGQ2pzS3Vj?= =?iso-2022-jp?b?d2xxQUhGTEJRUXdTSkYyeXdlanR2RWJTUDVHeUNJRHN1K0tIY1FJTjgy?= =?iso-2022-jp?b?bFNybUpRelNaWUQzbFFuS3ZRQWFKZWpxWk5QeHJzKzJmOWxoTjJHdGVj?= =?iso-2022-jp?b?OHVrY0wvZDIwOXVmZlBheTJMVUtqQllKKytYTStlU1RlR3RZWWtOb2dB?= =?iso-2022-jp?b?eCtwajVwak4vdzhKZW9QS2Q5UUxPWmNSYno2T2MwL3BtMzY4QVREWSs4?= =?iso-2022-jp?b?RkhoazRyMDBKK29KK2p0OHdUMjM3RytWbnIvQnIydTR2dzFVN3RlTDdF?= =?iso-2022-jp?b?UFpkVkRBL1FUZWFzUm9jWFd6aCtzaFIwUHVJZSswak04UmlHeTZyYkJm?= =?iso-2022-jp?b?UFBTWGJxVzNnM0l6L3NmL2xiN1NUN3pHSGU3SW1NdURzVnh2MG90NkZ2?= =?iso-2022-jp?b?SjNjVHF1UU93V1doSmlFS2ZGT2k4RkVN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aHo5QmhGNFE9PQ==?= Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <B3582B4D0C377F4788E999B4390C1252@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: 37fcad32-6847-4ff9-e3b4-08dc135f8fb4 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jan 2024 11:13:53.3153 (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: zSxWO8Z7c06z8ch4le93BZmGlKBCuWw+vv1qX+LxvGHcQji0jR7lwbnxyccVGRESxVNsQR7DQfkib5Rsz7zUCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB8696 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787882956933831228 X-GMAIL-MSGID: 1787882956933831228 |
Series |
[repost] x86/boot: Add a message about ignored early NMIs
|
|
Commit Message
NOMURA JUNICHI(野村 淳一)
Jan. 12, 2024, 11:13 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/
Comments
On Fri, Jan 12, 2024 at 11:13:53AM +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> > Link: https://lore.kernel.org/lkml/20231130103339.GCZWhlA196uRklTMNF@fat_crate.local/ > > 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 > @@ -387,7 +387,10 @@ void do_boot_page_fault(struct pt_regs *regs, unsigned long error_code) > kernel_add_identity_map(address, end); > } > > +extern int spurious_nmi_count; > + It has to be in a header file. > 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 > @@ -357,6 +357,8 @@ unsigned long decompress_kernel(unsigned char *outbuf, unsigned long virt_addr, > return entry; > } > > +int spurious_nmi_count; > + It is not a right place to define a variable. Do it next to rest of variables at the beginning of the file. > /* > * The compressed kernel image (ZO), has been moved so that its position > * is against the end of the buffer used to hold the uncompressed kernel > @@ -493,6 +495,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/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 @@ -387,7 +387,10 @@ void do_boot_page_fault(struct pt_regs *regs, unsigned long error_code) kernel_add_identity_map(address, end); } +extern int spurious_nmi_count; + 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 @@ -357,6 +357,8 @@ unsigned long decompress_kernel(unsigned char *outbuf, unsigned long virt_addr, return entry; } +int spurious_nmi_count; + /* * The compressed kernel image (ZO), has been moved so that its position * is against the end of the buffer used to hold the uncompressed kernel @@ -493,6 +495,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; }