Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1658944rdd; Thu, 11 Jan 2024 05:56:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5OCvgF2YjQL2RvejY0VBFFOtoTrVB9j7FnCi8JG5f7dBSMaVAh+5lvk6fVIkpAoIiu0Ec X-Received: by 2002:a05:6214:e65:b0:67f:48e0:671e with SMTP id jz5-20020a0562140e6500b0067f48e0671emr1357829qvb.92.1704981415647; Thu, 11 Jan 2024 05:56:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704981415; cv=none; d=google.com; s=arc-20160816; b=jwRxN3JfNWR8/WqZsPLD1wKOvO5otGIaJq5v35XBcKfMbSrd5MxKyMr6tnOUuKZ8xg guiRz25RjN0K4CpVHQ55vgPRW6ac/ANtaWZYrM0SFws/OCwLmSNpXvGdB4p7IxGq4jGY k7HUOb7CA3Rv1weWT4fx/N2pV6VbnPqFuL/r0eJ2QQwfwb1zDUOv7HO4iVwGeB8+WJu8 WJKdEOyRXpQAEEZ5Af5jS7ngNXi2UvyN+bfOBLGNacF3ca4igQVcy7GjP5ykUXMu7PKo J7ZDhNVr1nYI8qyIf7kufUS2HUwsP7s+Yofan6m4UrEN3rbOa5yZFdW8jdZTs1IqeHc8 CrGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=bfHU03jyJ0w3Yi3Kip/YjVxlQyGXD+y3SbGByUW7t+0=; fh=fozFfmvOB2OH6LioO+nm/i/X+k2E+hTLuoXcoSn9Ark=; b=LpnyXHx8R3FACucQBhkuXkHHg1MAZngSdnLTabpiZ9qghbz7z/3CaRwFjrCECKhfQV rB8kcLerHEkSamf+BuJcZIQs6Xxe2CUu1gWpjrmZ5a+j9cKJspqNrnMKZSaBhihKybfr XC8zG51pbpvKyiDtwKqDCgd8FS1kDhKM42O73XuTj16fB6XTNXWttQGVvExfaXyUMcXT YH4AUM/jtY6wotlMyQCJSVYnrwYijlfXnTLXhtF8BTkRBrhOcNiQ70Zxnoodn2YQ8jWa Rgw2Pb27BFWlyiMojTn/wayDNIbWUkeUxdGxcH5hdoMkQHHPuoYI9JaT3qHIZIcYmqEZ oV8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-23691-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23691-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x4-20020a0c8e84000000b0067f69b6e7b1si802930qvb.558.2024.01.11.05.56.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 05:56:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23691-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-23691-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23691-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 669861C2253C for ; Thu, 11 Jan 2024 13:56:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FE483EA85; Thu, 11 Jan 2024 13:56:08 +0000 (UTC) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (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 DD57F3B193; Thu, 11 Jan 2024 13:56:04 +0000 (UTC) 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 Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4T9mQG1wmdz1xm4K; Thu, 11 Jan 2024 21:55:18 +0800 (CST) Received: from kwepemm600017.china.huawei.com (unknown [7.193.23.234]) by mail.maildlp.com (Postfix) with ESMTPS id C42D41800B7; Thu, 11 Jan 2024 21:55:56 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by kwepemm600017.china.huawei.com (7.193.23.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 11 Jan 2024 21:55:55 +0800 From: Tong Tiangen To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , , Dave Hansen , , "H. Peter Anvin" , Tony Luck , Andy Lutomirski , Peter Zijlstra , Andrew Morton , Naoya Horiguchi CC: , , , Tong Tiangen , Guohanjun Subject: [PATCH -next v4 0/3] minor improvements for x86 mce processing Date: Thu, 11 Jan 2024 21:55:45 +0800 Message-ID: <20240111135548.3207437-1-tongtiangen@huawei.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600017.china.huawei.com (7.193.23.234) In this patchset, we remove the unused macro EX_TYPE_COPY and centralize the processing of memory-failure to do_machine_check() to avoid calling memory_failure_queue() separately for different MC-Safe scenarios. In addition, MCE_IN_KERNEL_COPYIN is renamed MCE_IN_KERNEL_COPY_MC to expand its usage scope. [1]https://lore.kernel.org/linux-mm/20230526063242.133656-1-wangkefeng.wang@huawei.com/ since v3: 1. Rebased on linux-next tag next-20240111. 2. Delete duplicate commit references on patch 3. since v2: 1. remove redundant fixup type EX_TYPE_COPY. 2. rename MCE_IN_KERNEL_COPYIN to MCE_IN_KERNEL_COPY_MC. 3. update patch3's commit message and the processing logic of EX_TYPE_DEFAULT_MCE_SAFE based on the discussion of [1]. Kefeng Wang (1): x86/mce: set MCE_IN_KERNEL_COPY_MC for DEFAULT_MCE_SAFE exception Tong Tiangen (2): x86/mce: remove redundant fixup type EX_TYPE_COPY x86/mce: rename MCE_IN_KERNEL_COPYIN to MCE_IN_KERNEL_COPY_MC arch/x86/include/asm/asm.h | 3 --- arch/x86/include/asm/extable_fixup_types.h | 23 +++++++++++----------- arch/x86/include/asm/mce.h | 8 ++++---- arch/x86/kernel/cpu/mce/core.c | 2 +- arch/x86/kernel/cpu/mce/severity.c | 7 +++---- arch/x86/mm/extable.c | 9 --------- mm/ksm.c | 1 - mm/memory.c | 13 ++++-------- 8 files changed, 23 insertions(+), 43 deletions(-) -- 2.25.1