Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1485634rdb; Wed, 24 Jan 2024 18:01:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFevXWQf1VJ0HzoNZEa4lvPZEIUrw1Faoildr8kQg6EMq4jlMgfpOm5rgSI2BjdmjItF74s X-Received: by 2002:a5d:4742:0:b0:337:c88d:51ac with SMTP id o2-20020a5d4742000000b00337c88d51acmr128682wrs.111.1706148109871; Wed, 24 Jan 2024 18:01:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706148109; cv=pass; d=google.com; s=arc-20160816; b=GKw5h5Mt87uM0/Eyr+RmvnW3lfzT+2wyVYAAo+q4wRQSIfw6gCDg15QtOKYfzXuR2l aDo538IwGf2pZSAJUc561Qz24uDwN2QKF1kRFsTBm8WVVj8cQ0/eeR5upPAHOiKf8mZK 6GgSQ8ItqT4M5sIA4QngV/Yo1rodORYjIQgqYS6R4ZPyueaoNFxtM08DcmkY6AJJw0X/ Z/5UYe+e/kubyDdC368sXGHhGI9uQC2TE8AW8Cv+rsdASy85wbppaO7sxwQ09KlEqzj6 1mDlDoxFhF5kx6wUxLCelki+SC4q2lmHENVPzhrpcNPpmq6IOXBRaxnqXvD2U1Frxb8W 8Q4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature:dkim-filter; bh=TP3gvB4O5zzE+BiCm9r/NxlSK6kkV76UP5ZO27vK2UY=; fh=ngqqV46e4g6jQsnYwEG2/z4AqkhFuOMviFuf/Jth4vo=; b=vq7Wp9D/oKYWea9ETP8KB7qzdlQv+oRPkcsBXcegYzGujNs/NtEUVzEM4bjT7SdN3E CIhHZzQgnUpo5Upv/Rk++EnVVZFRQV/oxCr09NUVXFvwNpxFNmJPqA+/eg9O8wdn6qEb BP++F1wWmz6CPAr3vAgOY8BiMgh/CpmfC8Swe4UrT9MUbAWgSwMb4zGh1ACiaULRsWUd DsyKAURgw/Zv4158o+Wp3n5gvJC0Me0mZF+dEOGgJVQDRFGJBwJQxrvBkM4ZH9IzkuEZ POQPgW8S/HyEFSc1RLYzY0Z8AJQmN1I/c051K29GWq3kSC0Nouye/VgPMoWAJtyBWMEt lCQw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@zytor.com header.s=2024011201 header.b=NTF2TQcT; arc=pass (i=1 spf=pass spfdomain=zytor.com dkim=pass dkdomain=zytor.com dmarc=pass fromdomain=zytor.com); spf=pass (google.com: domain of linux-kernel+bounces-37881-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37881-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ci21-20020a170906c35500b00a23539f10e9si441591ejb.356.2024.01.24.18.01.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 18:01:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37881-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@zytor.com header.s=2024011201 header.b=NTF2TQcT; arc=pass (i=1 spf=pass spfdomain=zytor.com dkim=pass dkdomain=zytor.com dmarc=pass fromdomain=zytor.com); spf=pass (google.com: domain of linux-kernel+bounces-37881-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37881-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 65BEC1F239D3 for ; Thu, 25 Jan 2024 02:01:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E1491FDD; Thu, 25 Jan 2024 02:01:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="NTF2TQcT" Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (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 5F78F5232 for ; Thu, 25 Jan 2024 02:01:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706148104; cv=none; b=gicbU8iDDaJ+4ljVrx4smbFvJtQbSoyUjW88td4HoA4UbMeeGLiOVbLqiZXJ5wEXS3M9Y+w8ksq4k00sYXITz0IbLjq9vc+al3+8g7UjaIDQIirG9O21CXDR2w6Eqvwo5UFDfmmHfIRTbl0f9ZLXyjg92TWIzzfTyw99e4Uk0pE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706148104; c=relaxed/simple; bh=L7rScDUkadYh/d3KjQe+8iZDG+h1qvpPwU7H3rKarec=; h=Content-Type:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To; b=tkn3BTmJvxjCMWWXp2pp5zWuPrsyb15/c8u9AUvYK9lo6fFozflrR3t/ExKhscV2/tPGQRyuH+FliVwVZJzOUbH81Aqk5Fq/smzy914B91jlJC4AFUikrISUj/hFX8g8e0TNfwIaYQzntBejnum7kMG3UEPmEt9rhpR2wf5IzOo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=NTF2TQcT; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Received: from [IPV6:2601:646:8002:4641:eb14:ad94:2806:1c1a] ([IPv6:2601:646:8002:4641:eb14:ad94:2806:1c1a]) (authenticated bits=0) by mail.zytor.com (8.17.2/8.17.1) with ESMTPSA id 40P20Mnt3949992 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Wed, 24 Jan 2024 18:00:24 -0800 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 40P20Mnt3949992 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2024011201; t=1706148038; bh=TP3gvB4O5zzE+BiCm9r/NxlSK6kkV76UP5ZO27vK2UY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=NTF2TQcTpvHV4G03Pm0IxnZuLBynT0eNo1Jfpl4Hy+dRtU1s7ykadj7YBn80WVTn4 Hm8Y5YlTwd+KLAzthH39wGQIst2fScBZeai9iq9BoZy+EnWivKHXj8S6inBMO8BEQ8 scWHPscBNMg7pIUk1kCI5ADgpcVZviVkqVXYnY+Lo2PsuvYEAf9C6eygeDKZuPt0vU Q4sdLdn4LQqoDD712ismRkG2aFd6dAsRARxeS5cjCvBpfwjJ1rjJh3Wto0cNplNK2m ZizSy8boNKSsL5qbTxqPyuLRDg/757Tp2gwLlwQ8ebQ58i4mHk6Xqg6X7bRhJFPSPl WJuKb+lWO3f4g== Content-Type: multipart/mixed; boundary="------------lQrJ9OFVI4N0V27GzGVY0R30" Message-ID: Date: Wed, 24 Jan 2024 18:00:16 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] x86/boot: Add a message about ignored early NMIs To: =?UTF-8?B?Tk9NVVJBIEpVTklDSEko6YeO5p2RIOa3s+S4gCk=?= , Borislav Petkov Cc: "kirill.shutemov@linux.intel.com" , "mingo@redhat.com" , "tglx@linutronix.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "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" References: <20240112120616.5zjojjmjeqg5egb7@box> <20240123112624.GBZa-iYP1l9SSYtr-V@fat_crate.local> Content-Language: en-US From: "H. Peter Anvin" In-Reply-To: This is a multi-part message in MIME format. --------------lQrJ9OFVI4N0V27GzGVY0R30 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 1/24/24 03:44, NOMURA JUNICHI(野村 淳一) wrote: >> From: Borislav Petkov >> 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 --------------lQrJ9OFVI4N0V27GzGVY0R30 Content-Type: text/x-patch; charset=UTF-8; name="putnum.diff" Content-Disposition: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