From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=113.46.200.216 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796302601; b=H2PK3VZKbYYnjiRzkzPGzSBL8gkLvCMKXSDCgfiKOpIIHRKwWJX31WLCvEw/BjTaw5YX O7RU8OtnXVTSXq4kdAlOahoYWC/yatWK6xLEAuzxKgY6Rc6hvuBvJLbqaPKXOqdYcVSf8 g8RKb5ocYC2Jxoj4GpQnd7O8mVevHTb9GGJE+vCYcD/0NZ4OdDCXxGEiPr/PSMAp+/31c zF2LdK5GMX8+t1+Qvg68r8I1Wx+WlRheIqd5UrHKRBj6AOu99VZ1c0W+2zbTmVNj8pRjA pnHyJqRRx0Ywp6HuPiYg1oVrbFEJLrkHCmCe1OAJBN02w4Xwc57kgbOAL5LiRUrlSWQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796302601; h=DMARC-Filter:dkim-signature:Received:Received:Received:Subject:To:CC: References:From:Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: Content-Type:Content-Language:Content-Transfer-Encoding: X-Originating-IP:X-ClientProxiedBy; bh=N+xtaDXQ5v4P+iFUfO6coe+CsS7BDqlNhJ702/BGdxM=; b=j1UKwicUXsX1155b/8lPlUviYiK+MtlYnxgGxlgSYw1gXpk8oLfUB/cWXY/4fgEYRE74 MsKPlmuPgMRW/Mt6nYrsVFUroSy3LPSLz4gKVaWCVE6yUaA6qk8A9Squ6Yu+EpAPIYP+/ Wlao+Ve29hiI4O/hE2lfKST5iL/zGPovsJeXlqUO7wPa6VYq+md6TPik9XSbALeouiHpP awpNTTogUHqqJA/qKKTiGUcA6kHPf3gyrXTP620e5krSersusJ+IvBquStgYfedlGIkKn xOa8k3yrYarC4TFDgx+obWR30QbmeVPSDrJPuLXgnRAsIwqtyXIYt9+Vja/dvGlTdQA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256 header.s=dkim header.b="nTTXQ/pO"; arc=none smtp.remote-ip=113.46.200.216 Received: from canpmsgout01.his.huawei.com (canpmsgout01.his.huawei.com [113.46.200.216]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C174606A32C; Thu, 3 Dec 2026 12:56:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4C174606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256 header.s=dkim header.b=nTTXQ/pO dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=N+xtaDXQ5v4P+iFUfO6coe+CsS7BDqlNhJ702/BGdxM=; b=nTTXQ/pOGyUgcLnH1xitCckp9V7gphhmbLoMIMn6Nmg4TBL7dv7c7FPnVIdB3klxdiOTuS/g4 x2iq+kXg4Fmf+B8o35ugAl/2YW1guJvcXR7BAtiJ9KDR4pneRlZZRCPOrrp3z8HugYGYNtAixwq eIaFx9mbLfru1ug+mae3hCQ= Received: from mail.maildlp.com (unknown [172.19.162.223]) by canpmsgout01.his.huawei.com (SkyGuard) with ESMTPS id 4jgF3N6ymbz1T4Fd; Thu, 3 Dec 2026 20:55:28 +0800 (CST) Received: from whupemk200014.china.huawei.com (unknown [7.152.185.79]) by mail.maildlp.com (Postfix) with ESMTPS id 5930D40561; Thu, 3 Dec 2026 20:56:30 +0800 (CST) Received: from [10.174.179.24] (10.174.179.24) by whupemk200014.china.huawei.com (7.152.185.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Thu, 3 Dec 2026 20:56:28 +0800 Subject: Re: [PATCH] ACPI: APEI: Don't disable HEST for a disabled IA-32 CMC structure To: , "Rafael J. Wysocki" , Tony Luck , Borislav Petkov , Mauro Carvalho Chehab , Shuai Xue , Len Brown , Will Deacon CC: , , References: <20261119-acpi-hest-cmc-disabled-v1-1-87644a1bf0ca@ahmedabdelfattah.dev> From: Hanjun Guo Message-ID: <1ad32efd-8e1c-c0a7-205e-bd3ff4912554@huawei.com> Date: Thu, 3 Dec 2026 20:56:28 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 In-Reply-To: <20261119-acpi-hest-cmc-disabled-v1-1-87644a1bf0ca@ahmedabdelfattah.dev> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To whupemk200014.china.huawei.com (7.152.185.79) On 2026/11/20 2:35, Ahmed Abdelfattah via B4 Relay wrote: > From: Ahmed Abdelfattah > > On x86, a HEST whose IA-32 Architecture Corrected Machine Check > structure has Enabled = 0 makes acpi_hest_init() give up on the whole > table. hest_disable is set to HEST_DISABLED, no GHES device is > registered, and every other error source in the table is ignored. The > only trace of it is "GHES: HEST is not enabled!". > > arch_apei_enable_cmcff() returns 0 for a disabled structure and 1 > otherwise. hest_parse_cmc() returns the negation, so a disabled > structure stops apei_hest_parse() with 1, which acpi_hest_init() takes > as an error. Enabled = 0 is a valid value: ACPI 6.5, Table 18.5, says > that the error source is then not to be enabled. It does not make the > table invalid. > > Before commit 9f9a35a7b654 ("ACPI / APEI / ARM64: APEI initial support > for ARM64"), the result of this walk was ignored. That commit inverted > the callback's return value and started checking the result. > > There is nothing to report from hest_parse_cmc(), and the spec allows > only one structure of this type, so ignore the return value of > arch_apei_enable_cmcff() and let the walk go on. > > Fixes: 9f9a35a7b654 ("ACPI / APEI / ARM64: APEI initial support for ARM64") > Cc: stable@vger.kernel.org > Signed-off-by: Ahmed Abdelfattah > --- > I hit this with a hand-built HEST in a QEMU guest: clearing Enabled in > its IA-32 Corrected Machine Check structure also took away the generic > error source next to it. > > Tested on v7.4-rc3+ (4405c18c95d2) with a HEST loaded through > -acpitable that holds two error sources, an IA-32 CMC structure > (FIRMWARE_FIRST, bank 8) and a polled GHESv2: > > CMC structure without the patch with it > Enabled = 1 HEST initialized, "Enabling the same > Firmware First mode for > corrected errors", GHES.1 bound > Enabled = 0 "GHES: HEST is not enabled!", HEST initialized, > no GHES device GHES.1 bound > Enabled = 0, HEST initialized, GHES.1 the same > acpi=nocmcff bound > > Every boot also prints "GHES: Failed to enable APEI firmware first > mode", because the guest's firmware has no APEI _OSC; that is the same > with and without the patch. > --- > drivers/acpi/apei/hest.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c > index 20d757687e3d..881dd0b25939 100644 > --- a/drivers/acpi/apei/hest.c > +++ b/drivers/acpi/apei/hest.c > @@ -185,7 +185,7 @@ static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data) > return 0; > > if (!acpi_disable_cmcff) > - return !arch_apei_enable_cmcff(hest_hdr, data); > + arch_apei_enable_cmcff(hest_hdr, data); > > return 0; > } Looks good to me. acpi_disable_cmcff will always be 1 on ARM64 and ARM64 is not using CMC, we should keep the code as same behaviour as before on x86,thanks for the fix. Reviewed-by: Hanjun Guo Thanks Hanjun