Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3368232rwe; Sun, 16 Apr 2023 18:35:41 -0700 (PDT) X-Google-Smtp-Source: AKy350ZP0SStaloGDylaDAzXMUu3Kkr90Q8uUjRBUrttGfSJ8ZijOiTEimv1h4AX9GzvKAQysMh6 X-Received: by 2002:a17:903:8c3:b0:1a6:3def:6007 with SMTP id lk3-20020a17090308c300b001a63def6007mr10570280plb.7.1681695341586; Sun, 16 Apr 2023 18:35:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681695341; cv=none; d=google.com; s=arc-20160816; b=R0HpXniurRvPcVA/3aEGZmcXUvdGEXcrc/vt4/ASO6NEr+g5kps+MEj3wh5Zu3o3W7 X36ANUXrwLuT2GI2/mHsLm7DqBoKkfR2IwQA4P2SlMSyxA/Sut5nX/n5Urzd2b/Q7PfM SnarAn5NhO1/Fn4EVrxkUGfJh3CTx0e6Cuv9LvzJ2Oau8X3tqgDgHKYJQC8H/+OvS3JH iE3b/23nAhC35dMXSknCn8WLHPn7LZwGMzgGmqXd9BbWwabvI0F113fOTLWwavpWNSr5 jDUI1e4EkzJ0yUSxvPTnepCgxXm47ueK2EYIo1jgdOFASam1dSfv6X6i52i4abqdJe75 Unhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XFhxc/REeNGfZ6dZ6Dzd5eKATlH3RR1l+3DEJnJWL14=; b=SU6Xbo3mbgzh7XXMza8P5x5H8vlCCZWpITEq60AHtNmfWa2Tu7PzcLmp6X5SUDzLpL bcNLy8hKZrGNrkrXMgMITCAGIY5/tbr1d4P7xdG2IKdzWSwJoGwo38aQcg98fxw7dGwc g06Pug7DU36ZOBvmSRKOiQ1FN6CbWF3WfGB4YcJ733GaAaH/CNRSW4HB5Ej9cTbMNRKk 4urjEhsaB+4jaBAldvM0BICS/ZsWdRI1Q3I3Ef5DqFqX+G8Wz9TfwJLSFhfwySpsxoLJ 1+e9ELSCyYAxrFFSy0EU5aEH2fewsLdnZm4uqQMtxPbRZ4SUnNybM0fyL/ShIh6FCdxG I30w== 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 je9-20020a170903264900b001a6a015c7d9si7226408plb.623.2023.04.16.18.35.26; Sun, 16 Apr 2023 18:35:41 -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 S229742AbjDQBOV (ORCPT + 99 others); Sun, 16 Apr 2023 21:14:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjDQBOT (ORCPT ); Sun, 16 Apr 2023 21:14:19 -0400 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F25CA1FE0; Sun, 16 Apr 2023 18:14:17 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=xueshuai@linux.alibaba.com;NM=1;PH=DS;RN=25;SR=0;TI=SMTPD_---0VgBQJ7A_1681694050; Received: from localhost.localdomain(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0VgBQJ7A_1681694050) by smtp.aliyun-inc.com; Mon, 17 Apr 2023 09:14:12 +0800 From: Shuai Xue To: rafael@kernel.org, wangkefeng.wang@huawei.com, tanxiaofei@huawei.com, mawupeng1@huawei.com, tony.luck@intel.com, naoya.horiguchi@nec.com Cc: linux-acpi@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, xueshuai@linux.alibaba.com, justin.he@arm.com, akpm@linux-foundation.org, ardb@kernel.org, ashish.kalra@amd.com, baolin.wang@linux.alibaba.com, bp@alien8.de, cuibixuan@linux.alibaba.com, dave.hansen@linux.intel.com, james.morse@arm.com, jarkko@kernel.org, lenb@kernel.org, linmiaohe@huawei.com, lvying6@huawei.com, xiexiuqi@huawei.com, zhuo.song@linux.alibaba.com Subject: [PATCH v7 0/2] ACPI: APEI: handle synchronous exceptions with proper si_code Date: Mon, 17 Apr 2023 09:14:05 +0800 Message-Id: <20230417011407.58319-1-xueshuai@linux.alibaba.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221027042445.60108-1-xueshuai@linux.alibaba.com> References: <20221027042445.60108-1-xueshuai@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,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 changes since v6: - add more explicty error message suggested by Xiaofei - pick up reviewed-by tag from Xiaofei - pick up internal reviewed-by tag from Baolin changes since v5 by addressing comments from Kefeng: - document return value of memory_failure() - drop redundant comments in call site of memory_failure() - make ghes_do_proc void and handle abnormal case within it - pick up reviewed-by tag from Kefeng Wang changes since v4 by addressing comments from Xiaofei: - do a force kill only for abnormal sync errors changes since v3 by addressing comments from Xiaofei: - do a force kill for abnormal memory failure error such as invalid PA, unexpected severity, OOM, etc - pcik up tested-by tag from Ma Wupeng changes since v2 by addressing comments from Naoya: - rename mce_task_work to sync_task_work - drop ACPI_HEST_NOTIFY_MCE case in is_hest_sync_notify() - add steps to reproduce this problem in cover letter changes since v1: - synchronous events by notify type - Link: https://lore.kernel.org/lkml/20221206153354.92394-3-xueshuai@linux.alibaba.com/ Shuai Xue (2): ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events ACPI: APEI: handle synchronous exceptions in task work arch/x86/kernel/cpu/mce/core.c | 9 +-- drivers/acpi/apei/ghes.c | 113 ++++++++++++++++++++++----------- include/acpi/ghes.h | 3 - mm/memory-failure.c | 17 +---- 4 files changed, 79 insertions(+), 63 deletions(-) -- 2.20.1.12.g72788fdb