Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3921836rwi; Wed, 2 Nov 2022 04:57:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5SyRl/l4hDheQxAr/sN3D6Hgzok6sl+M9abcA96EhnhMJg6qTzpIn8pm77/eFWUN4I8qbg X-Received: by 2002:a05:6402:4511:b0:45c:b2b4:3e69 with SMTP id ez17-20020a056402451100b0045cb2b43e69mr24171953edb.339.1667390246770; Wed, 02 Nov 2022 04:57:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667390246; cv=none; d=google.com; s=arc-20160816; b=hma7Pt+AquRmcI0PneOuGPSadxVXfo/gPeQilZyo5qGyQLG85H96Z4yLr6erlV4acl Obm4QOOfyYlu+TN6dWhxCVf+46bem5ILfVlXsL5my8nVzj4rxbwvjOQkxbzTXgQYDpOZ fXwK8JJsMyqT9SmBSQv/rwL8fUh26Cg4+zIBh7gOMOiQ7+HaAB0XyY3sF+U4dOvJOT+f AO7aPWFI+Nzrsn20eHBIkvAPwhNCDMlNnk4BPLTjT4MEWuiwiIKFawKEfH+T2Ikj6zVn aY0vs0h1RBFu7PEY0DiQml4m0buJ/s6sRrnq6ebf5O3Ndzbz6bh6VZv8sB1G1NQZDWCl x7Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=xQnnj5t7maTH0bivdaAusamETh36AwB95r6mCD6nxUY=; b=heDMuw8Dd7raEq0ncqrc+EXyvPUiGMeUj9WDs2qFsSSBePn8ycyPjh02AxMRK+LCsn 4MoGyqE2akdsZgHH48s5Q9L4rqkaSo9IibIMDrkox4Pbq0jwUgcU/l8TlD3xBb8JOeDK jyZoulnAyhGrcMr2QWfpRZ7mKaZUYx8/IFVs/kZja6FPuXKRps5dn2OKarEPpXOL1eUg ClZCVuo2Vz0GX5/8hnsH9KvvUs/hjuKCfEeDsAJN5qF615ZCIG1KEl/WW7PNuYDGTNAj mf9GwtLz+GwIuRxZX+g0F+jnKTAcmItlVm40t4LxvlTMq/coyAbhAEO1k9Hq7/kiTu9q eDCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k4-20020aa7c384000000b00458264c2df2si14180639edq.164.2022.11.02.04.57.03; Wed, 02 Nov 2022 04:57:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230426AbiKBLyF (ORCPT + 98 others); Wed, 2 Nov 2022 07:54:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230075AbiKBLxx (ORCPT ); Wed, 2 Nov 2022 07:53:53 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB5181D0CB; Wed, 2 Nov 2022 04:53:50 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R541e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=xueshuai@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0VTo2zKq_1667390025; Received: from 30.39.85.212(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0VTo2zKq_1667390025) by smtp.aliyun-inc.com; Wed, 02 Nov 2022 19:53:47 +0800 Message-ID: <6eb3c5f4-2198-d501-7320-ea6209a63465@linux.alibaba.com> Date: Wed, 2 Nov 2022 19:53:44 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH] ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on action required events Content-Language: en-US To: "Luck, Tony" , "Rafael J. Wysocki" Cc: "lenb@kernel.org" , "james.morse@arm.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "jarkko@kernel.org" , "naoya.horiguchi@nec.com" , "linmiaohe@huawei.com" , "akpm@linux-foundation.org" , "stable@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "cuibixuan@linux.alibaba.com" , "baolin.wang@linux.alibaba.com" , "zhuo.song@linux.alibaba.com" References: <20221027042445.60108-1-xueshuai@linux.alibaba.com> From: Shuai Xue In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2022/10/29 AM1:25, Luck, Tony 写道: >>> cper_sec_mem_err::error_type identifies the type of error that occurred >>> if CPER_MEM_VALID_ERROR_TYPE is set. So, set memory failure flags as 0 >>> for Scrub Uncorrected Error (type 14). Otherwise, set memory failure >>> flags as MF_ACTION_REQUIRED. > > On x86 the "action required" cases are signaled by a synchronous machine check > that is delivered before the instruction that is attempting to consume the uncorrected > data retires. I.e., it is guaranteed that the uncorrected error has not been propagated > because it is not visible in any architectural state. On arm, if a 2-bit (uncorrectable) error is detected, and the memory access has been architecturally executed, that error is considered “consumed”. The CPU will take a synchronous error exception, signaled as synchronous external abort (SEA), which is analogously to MCE. > > APEI signaled errors don't fall into that category on x86 ... the uncorrected data > could have been consumed and propagated long before the signaling used for > APEI can alert the OS. > > Does ARM deliver APEI signals synchronously? > > If not, then this patch might deliver a false sense of security to applications > about the state of uncorrected data in the system. > Well, it does not always. There are many APEI notification, such as SCI, GSIV, GPIO, SDEI, SEA, etc. Not all APEI notifications are synchronously and it depends on hardware signal. As far as I know, if a UE is detected and consumed, synchronous external abort is signaled to firmware and firmware then performs a first-level triage and synchronously notify OS by SDEI or SEA notification. On the other hand, if CE is detected, a asynchronous interrupt will be signaled and firmware could notify OS by GPIO or GSIV. Best Regards, Shuai