Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1775954rdb; Sun, 4 Feb 2024 00:27:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IE96AnyITpmkkA8nqTGSvM4d2Svct22xH43WnbiTiXKv2oue0OTZe5yrZ0OVmksjz9WmFdg X-Received: by 2002:a17:907:9115:b0:a30:fc52:b87a with SMTP id p21-20020a170907911500b00a30fc52b87amr3460536ejq.60.1707035254109; Sun, 04 Feb 2024 00:27:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707035254; cv=pass; d=google.com; s=arc-20160816; b=nxyM34k3UXJdKYj5tUGr6fBDwNPRoAvwyhrNpUkNdWcHDhXR1hLDPBXp/Ti8r06lHD n8Ec3ZbxTwJshin+huYjRwMhg3VSflV45YGuWl5wxTBcETjUIUWe8MIZeVyhJ8CX/ETv 8IrWDZYPGOuPDDwWScPQO5EcCUWZw7U6IhYkE4B4ULjiQ1hZveQasaijqQTD83X/SuyY VygzkeI62YAnGB1RQbrleDnh0tLOS2KJUlH6y2bfGVm6hCwT2SB1uzYvXjH/vLWUs9uV uFdJeUz9uQhRpdQJrhWF5SODPjcujYvfsZBQVjLnSgeKl7S2+IYZIgQW9j9FyBZsQ24w UIxQ== ARC-Message-Signature: i=2; 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=Se7pgDmCe8FUVbN5XPvwaX+uBzrq74Qa9jRttiSPGjc=; fh=3Vqj9wYEdbpJrFtO9bYm9TzSYBBrhVLmcvUHmRKgPi8=; b=SqLUjpwEVV66+3F29qpmg9oaJp10669xQEd2n4sToDRSUzOfT6CRcz7UU3+41dbQbU V5NKP0D4v99WT1VcJptIVL445vJKC6Zs9BEeEgI/eMEts2WReHVKg2pDiKYQxMsayRK2 yo3Ll8u69k7JlDHHrtpnpA4zeSu0IUIz8bm3iXaXp/zRHgkugSwnVzCzqnbVJ4eTzCr5 tttlyPPw4l/MkKU8o0BDKccbTY1iefxaG6tRH5Ey/+xf/89UCFo1f4yvHskUre0NDgl3 kw4dbLELZID4yA1f/G+7P0sm2wKiFs9l2vohGvuYg836s610blPXt2ppcJdNr7Kn1HbK 6iAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-51523-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com X-Forwarded-Encrypted: i=1; AJvYcCXr/ebwXDmAmiNeCK9DqGcB4McSI+FNBZ/XYW85Rz5ZpAqVVXZKhNZuLBu6I1YbT36hUA1xQaMMZyruVpyvdm1/UYRO7Anti8YdUMY3aw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g20-20020a1709067c5400b00a3786b35db0si553218ejp.237.2024.02.04.00.27.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 00:27:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51523-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; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-51523-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51523-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 am.mirrors.kernel.org (Postfix) with ESMTPS id D6D911F23DF2 for ; Sun, 4 Feb 2024 08:27:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A569312B87; Sun, 4 Feb 2024 08:26:43 +0000 (UTC) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (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 C72CF125DB; Sun, 4 Feb 2024 08:26:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707035203; cv=none; b=szAG3lqAAQb2Np58KCp5Bv9GNc6dj4MiusWgAAaHXnQN3qam3T3QzQNByMVPLgZWNSJPike7loedckoPW8HLJYvp1hm8LmE3IL+MzTPr/WhSk45aGcjG72YqI21IIsOMB3fCRVTke0M+7nuNoWh0lvFMajrJyXmXsOoxs/oaUqA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707035203; c=relaxed/simple; bh=2DNwTv1VrV9mcsexzKV9H62e06r46BDwnFnMJYRG1NE=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=aMazE/nI+WPyqKXoqB27eCs9NerZ5Yz2vZa5i2To7/nD2l5LzyHOGW6wdvVSHzhLfyh48S0I7ldm2KykKfmfLCZSCMgT8in4xw4ZxqaVUKN3Fafx0zoPxbD81BueFmKwF7KjGH/P0X+sWJLoLtCNcbdGmFYT+y/bo7IGZSP/uuo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 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.162.112]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4TSMxg1Rpxz1gyTP; Sun, 4 Feb 2024 16:24:39 +0800 (CST) Received: from kwepemm600017.china.huawei.com (unknown [7.193.23.234]) by mail.maildlp.com (Postfix) with ESMTPS id D6F74140120; Sun, 4 Feb 2024 16:26:32 +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; Sun, 4 Feb 2024 16:26:31 +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 v5 0/3] minor improvements for x86 mce processing Date: Sun, 4 Feb 2024 16:26:24 +0800 Message-ID: <20240204082627.3892816-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-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) 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 v4: 1. Patch1, suggested by Petkov, changes as follows: a.Improve the commit msg. b.Directly delete the unused fixup_type EX_TYPE_COPY instead of disrupting the overall layout. 2. Patch2/3, improve the commit msg suggested by Petkov. 3. To better describe the problem, reorder the patch 2/3. 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_COPYIN 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 | 2 +- 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, 13 insertions(+), 32 deletions(-) -- 2.25.1