From patchwork Mon Jan 15 08:57:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Tk9NVVJBIEpVTklDSEko6YeO5p2RIOa3s+S4gCk=?= X-Patchwork-Id: 188076 Return-Path: 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 (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 ; 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 ; 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=?= To: "kirill.shutemov@linux.intel.com" , "mingo@redhat.com" , "tglx@linutronix.de" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" CC: "hpa@zytor.com" , "ardb@kernel.org" , "david@redhat.com" , "nikunj@amd.com" , "thomas.lendacky@amd.com" , "debarbos@redhat.com" , "jlelli@redhat.com" , "lgoncalv@redhat.com" , "dzickus@redhat.com" , "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: References: <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?Q2JxTjMrN2dsblViNUV5S2UvTHpaeTJsaFhTcUZtdGM4K3FLb29kT0pI?= =?iso-2022-jp?b?MVk4WUFPYlRZb2xJQTRTNTNQSUwzazRxV1J0U0dHOG9EdjQ2dkFEZ3hm?= =?iso-2022-jp?b?VWx4TlRxN2hOVWlHeUxnQzlJamJXbXgwem9YMlBBWTIydlpidWxqbnFy?= =?iso-2022-jp?b?Rk56Ry82TENCRjhRcElOOVhGNGpscHZINytzYVpMOTlscU9YcVhIdElF?= =?iso-2022-jp?b?bFMvYkNPRHE4bGlVOVVsdU1hLzRZZWhZZkRtdVNFNVY5a0IzZlRxN2Js?= =?iso-2022-jp?b?MGZSRzVxYThlc1pRbUZXZ1FuNUhDT2F4T3EvdnZIeWhYUWN6TGxwY1h0?= =?iso-2022-jp?b?VFdxZkVsYy9FNytYQW4vT3FTeWNnNk1qQk9KL3hBWWtnOGltRWZ2SnJi?= =?iso-2022-jp?b?VmFOUHl3OUZuVTNOOHUzU3J3QlRCRW5CLzNVQnRjZDJlL3FISUM5QjJ5?= =?iso-2022-jp?b?dVNHdDhwQ0dyTDlXaEtaeU1aK0JybXp5Z3J0VVB3dytYNDNlRC9QTHVF?= =?iso-2022-jp?b?alpkWkx0RUlPOUlHMitnOU9lRXhwRVNQWlhpamJFZ2kwZHd6cTdFT1Vo?= =?iso-2022-jp?b?V1VONWFSelBqRlNaUXROTEJrZWNkQ2hmMFR1d0hxY05NdlpGVUdxNXc0?= =?iso-2022-jp?b?Q2ZJcU04V2FNa3NYSEFyZXMzYncxdCtPclVJTGdvU3VqOWtJTStTRVhZ?= =?iso-2022-jp?b?amZudTBhSmNoZVQ1YStDZEVJTllRdnh5ZHh4eCtyVitCeEloZEViUkxS?= =?iso-2022-jp?b?NmFCdW14YTZxR1RMQitHaG1Cc3MxL0RwZGNadEVoejM0UHN5RzJra2dq?= =?iso-2022-jp?b?RitsaG5LNjNGek9qWVVoVEx3WEN2M2dXTmxqYzlZYXR4T1I0NEFKZUo1?= =?iso-2022-jp?b?eFRIdkVpMWFXQy92Ny9tWStuOVNsci8wS0FyMXVJQzJRS3JGanJ6NnJB?= =?iso-2022-jp?b?OGF0U1JUUkZHaUMwMm1rZHFFSlVhNXptVStFWElWNWczNjRja1JUTldI?= =?iso-2022-jp?b?TStZajAzMU13bTNoSEhyTk9VRFIzWkFOaVNIZFhlamo0WUdjYVhTNHU2?= =?iso-2022-jp?b?V09RaDJRM2s5Tm9oM1pPaldUejdTNE84d20xT3RMMi9rUlZKRlhZeldU?= =?iso-2022-jp?b?a1QxS2ZlWGxSYjNjRUFiM0U0YzM0TmpjamEva2RDa3I1ekpoVkFZNGRw?= =?iso-2022-jp?b?bXlSTVJsKzFxK1NCNm9kWEthTTNZU3B6dFJwTElITU1DMTdpT2dJam1P?= =?iso-2022-jp?b?cDJqL3NkTkNRODNsT2NhVEx3YUZNY085T001OUQxOFN6OURLaDFwTUFJ?= =?iso-2022-jp?b?MFc2NnlpOUpXSUpwTXVGUldJdmFiTkJXUlJheGtNTFh1NWNndHF3SkJp?= =?iso-2022-jp?b?cStuQW5zc3Q2N05ha2dtQ2UvY3FlRUNnRE11bjRkaWFEK3IxdzBwS3kz?= =?iso-2022-jp?b?UGhPWDVmdUYvRk1TdDczMGt2VjBRYXJLWXhpZEd2SjhrQ0lsNERpTHl1?= =?iso-2022-jp?b?ckUvd3lWRFlJSkpUUkVBZ1QxSzA4a1I3WnFrR1JGTHdBNjVSRitXbm8w?= =?iso-2022-jp?b?N29IVGRJaWFQZGVtWDBTUHVhcFRXTVloS3RmODJ5TTQrUU5zRFdtMzBh?= =?iso-2022-jp?b?U2h6YWU3T2VGRXlNTkhyWUJmcmxIR1lwUGFwQUNtejIwSnc3eXZJZXQ3?= =?iso-2022-jp?b?bEVOQW9aQzBjRmlIVWEzYldKZUp2aW4zRFFISDkzcEJ5NHoyalFGUGlG?= =?iso-2022-jp?b?WWZCcDBNNElaMzRhVktqNjJhZGxhb2ZuVVVYZXp6QnV2NVZPVjdNQjVI?= =?iso-2022-jp?b?NDlHRlNlMHQwSkxzSGZFTmdKWjBIa1F2V21mWHd1cmkva084bFBkRWwx?= =?iso-2022-jp?b?aVAxQWJFaExsQkE9PQ==?= Content-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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 Suggested-by: Borislav Petkov Suggested-by: H. Peter Anvin Link: https://lore.kernel.org/lkml/20231130103339.GCZWhlA196uRklTMNF@fat_crate.local/ Acked-by: Kirill A. Shutemov Signed-off-by: Jun'ichi Nomura Signed-off-by: Borislav Petkov (AMD) Acked-by: Kirill A. Shutemov Signed-off-by: H. Peter Anvin (Intel) --- v2 * Moved variable declaration and definition to the right place based on comments from Kirill. No functional changes. 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);