Received: by 2002:a05:7412:b112:b0:f9:3106:f1c0 with SMTP id az18csp117220rdb; Mon, 18 Dec 2023 00:24:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWoXszoc+UVIQY+If6qY/JkhD4zyHkYkbTQ8gARAieWDDlAP6bystvWGrqNePuONBtkHEp X-Received: by 2002:a17:90b:108e:b0:28b:187:2db with SMTP id gj14-20020a17090b108e00b0028b018702dbmr2752665pjb.82.1702887882613; Mon, 18 Dec 2023 00:24:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702887882; cv=none; d=google.com; s=arc-20160816; b=bxrK/7q9WozoWBZSoP6VXfXgon4/u5It1Ri/aZsTkK7XLIzzzyehdwSi7OYBCmQigV m+CxIu8DHkUmEgFcdxwvBf0isvog733h1rXM6mMM/DAD5QESMcGH4yR1Rr2+vDU2L5sN WMv0S5qC3EPEQrFWE4Yap6CMvMnEvd8arjTsRXZb7uWMYvOUDv+K+GUQcy/nth1GqGcl 4k7EcV0xMdE4W8NdYw6HfNt2IpgnHcfpVqmgCej+Z/FZ93W9ur/zZCKcsdGVRi2y4ywm HcB68r0V+EWfo0JcOPE40BVOVoiKIjeFXWAZ7Gn3mvXQdoRTzIFyg1kCkzS9YBm1XCte puHA== 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=JZN5eJOsnBaYFNOHDTkXsVOGdxcBY4w3uq5tLupuD3Y=; fh=fozFfmvOB2OH6LioO+nm/i/X+k2E+hTLuoXcoSn9Ark=; b=YACW0IrHT/VXfylDpM/e/8Q+l+D6haWExmdvJsMX5X/aD+TFdzHYaTQXI4d9IyBslq KcdcVdHZumpX+9KhFvmm1MlKJp9Ply5/E2Ag7ssmFms6jCHeKC9J5hAqrSXqPRcqDeFD i+rCrfvIQ+CglZXnbsoQ9DGdtRNvlW4cvypBJjq9z3e1PeunKI0gNHzsjNxaK8qhbiRp NKYsjew5agHtQyxyS1FCVoZ+vuJ6T52PZeXilWLKTuhwGTe3sgDuSZwkJN5mxr2fsoYN BDuEfz/LAtoJtVaK1ifAr4/SYf5lnguvwem+xPL+/snmlrXzjQyBGeBfhCRnBgPzVcis /hAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-3155-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3155-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m11-20020a17090ade0b00b0028672a7b3casi3933468pjv.29.2023.12.18.00.24.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 00:24:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3155-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-3155-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3155-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4A5FD2821E5 for ; Mon, 18 Dec 2023 08:24:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30778107BA; Mon, 18 Dec 2023 08:24:28 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (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 3B0E1125A5; Mon, 18 Dec 2023 08:24:24 +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.194]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4SttC81tQFzMnwK; Mon, 18 Dec 2023 16:24:04 +0800 (CST) Received: from kwepemm000017.china.huawei.com (unknown [7.193.23.46]) by mail.maildlp.com (Postfix) with ESMTPS id 112571400DD; Mon, 18 Dec 2023 16:24:17 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by kwepemm000017.china.huawei.com (7.193.23.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 18 Dec 2023 16:24:15 +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 v3 0/3] minor improvements for x86 mce processing Date: Mon, 18 Dec 2023 16:23:57 +0800 Message-ID: <20231218082400.2694698-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: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm000017.china.huawei.com (7.193.23.46) 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 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 | 12 +++-------- 8 files changed, 22 insertions(+), 43 deletions(-) -- 2.25.1