From patchwork Tue Nov 14 12:56:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiju Jose X-Patchwork-Id: 13455269 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D691C4167B for ; Tue, 14 Nov 2023 12:57:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0FCA98D0049; Tue, 14 Nov 2023 07:57:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 05F498000E; Tue, 14 Nov 2023 07:57:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E1A838D0048; Tue, 14 Nov 2023 07:57:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id CB6C58D002E for ; Tue, 14 Nov 2023 07:57:09 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id AB3B440A18 for ; Tue, 14 Nov 2023 12:57:09 +0000 (UTC) X-FDA: 81456560178.09.415012D Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf08.hostedemail.com (Postfix) with ESMTP id CC82D160010 for ; Tue, 14 Nov 2023 12:57:07 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.hostedemail.com: domain of shiju.jose@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=shiju.jose@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699966628; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=egcaR5FE8qNJdcLoG5LnXfjvV3igdM/JRBRG8kXiXmM=; b=SeaAFXokxBof9Oik33LpwarRRaWiRRvCJhgL9H5Xuq8Tk3Tm59n2I3k7Uvkl0QKweYWyjq iBVTJ9NoHSPbqQpaflcNuAcFRv/GrMuSthBFF8VvX1kCeM+U/T6G/ENd1qME3KD93kH0ER i3RkjQDO8o7UEaOnhKFdZ3jJsEi21cM= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.hostedemail.com: domain of shiju.jose@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=shiju.jose@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699966628; a=rsa-sha256; cv=none; b=nz0Wv+w5vW7HmuOG1Eb4wqSl4fjwT3gjYX5HJ7Nx/RNYV7qHjaRnS4neoFkfa/STgJ5hP/ ZvhL7UJ+5eDC5byJYnbQyDwOWU38joN1bql6uDcZV5xFSnqG8pmotrtEPeZhmU3W8QOAxK I2b8LoaqPVdGEM+Q8AYqc4ULojBCPt0= Received: from lhrpeml500006.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4SV5mV35ssz6JBHR; Tue, 14 Nov 2023 20:52:26 +0800 (CST) Received: from SecurePC30232.china.huawei.com (10.122.247.234) by lhrpeml500006.china.huawei.com (7.191.161.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 14 Nov 2023 12:57:02 +0000 From: To: CC: , , , , , , , , , , , , , , , , , , , , <"pgonda@pgonda"@google.com>, , , , , , , , , Subject: [RFC PATCH 0/6] cxl: Add support for CXL feature commands, CXL device patrol scrub control and DDR5 ECS control features Date: Tue, 14 Nov 2023 20:56:41 +0800 Message-ID: <20231114125648.1146-1-shiju.jose@huawei.com> X-Mailer: git-send-email 2.35.1.windows.2 MIME-Version: 1.0 X-Originating-IP: [10.122.247.234] X-ClientProxiedBy: lhrpeml100001.china.huawei.com (7.191.160.183) To lhrpeml500006.china.huawei.com (7.191.161.198) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: CC82D160010 X-Stat-Signature: 8ywn3cg1guohyuy5kdeu7qcsom6bfjrw X-HE-Tag: 1699966627-76024 X-HE-Meta: U2FsdGVkX1/DQiGZ/xfqH9JUUwvwVpab9CcsobF2OrGrjNuuN4JmocHyrUzMy0eH+T+KL06OkPF8jyWrgncZeGULqfCq6+TQpFHj7GwxdR8cCxQtg6utW30+YwxbPBOavihLMy0Fs0HCrBen40KjqsGaz4n8AmbYmMWKKhhjd5aDZovxRylLH24wad2i22CcfRA/3r6ZIzH5cnMw476FyNCmZ/1yBPjfDULdkyipamFQULrX9si0GCVeEyZ/tjwN3SGKkUANp/vkxwgyg3vG7fodsUUsviLM8PJinBm6NfxcimExnvWjpr4Xl8fiiSyneEXUpQUGef0JDxoxYjyLL0lUdtLmtm6+fiDik6csi5Nzun31OeNXL9CRE8QiSqPcONePTx8ozwEtCro8BbhgHLin9yTcNIlMwj/MGakNFK5U7HTpmrgeW3wT1QCjkAD6nxjX8PJivd9LoidZokO1T5vlfBX3Qidgm5SkCbHq5z5lmEjMEGpGoDUziLa8dOx5s5RzsWmV8G3wpYcRrfukGiBirBEHooobgQjOjlu9cYcKak5wxAInWU5b8DQm2xu+1iAegwPFhfe2k4XJoWNiNvi2Edz51yDwQ7CoPoIhaFTf6unAfNdBLJiE1WerB8aVqMF6Spm4R82sabKYLSY1AOFz76JKNEtCc/dH6uJS/EQ76O5DdiLLGt0g5ek5pKVLejmlQ/ib6InLiNjAYI9DJHMMPKZts7COG4j5kH+haZ2bWe7gX9K1ecav7N+lS0WsxteH5jf88fcxfA3IT6GH8NgjX80z4QDxa09OhhRTWdD9DzAr8K/vmJlWWPew3laO6Bmbnfl1aWgyRrbblR58t+C53tp9Tbspiwh0i1C3O5nZzp524WhaOsbCzghHqbYQ4jYJBpTDVhMIG1IrKGzqoR8ajLg4DE2NSOPckJ4KEirwMTjI6Y4AeX7xrYKGxn9HhKpdJKq5fqaybkwJg/M rXcMhueP y7EBcF5wVqszZ/0DlqJ4KGA6MtlgCwDHBUVI6eygoB4qjDKR7UTpzt1ysFWYAwszKCS73DIpH5z+GJSbF7yzOwRJIq+tbm/jl3aK7M7EQ2nOSaW04BHZ/36psH0uiL+CWz1lotRpBazD5uenjrHTGTygd0aSp8CByK5/d/3iL/QYcJ47PYX+J8aXD8V6rMbs0tqUcWtH3ZceoAOR8tDfMNAaEwiY0Q1qsqI7ZWi5aD9FAj8PM+hb2IxLSqg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Shiju Jose 1. Add support for CXL feature commands(CXL spec 3.0 section 8.2.9.6). 2. Add CXL device scrub driver supporting patrol scrub control feature (CXL spec 3.1 section 8.2.9.9.11.1) and DDR5 ECS feature(CXL spec 3.1 section 8.2.9.9.11.2). 3. Add scrub attributes for DDR5 ECS control to the memory scrub driver. The attributes for the CXL scrub control features is exposed to the user in the sysfs and is based on the previous code submitted for the memory scrub control feature. The patch and series for supporting memory scrub control feature are here, https://lore.kernel.org/lkml/20230915172818.761-2-shiju.jose@huawei.com/ https://lore.kernel.org/lkml/20230915172818.761-1-shiju.jose@huawei.com/ The QEMU series to support these features is available here, https://lore.kernel.org/qemu-devel/20231114124711.1128-1-shiju.jose@huawei.com/T/#t Shiju Jose (6): cxl/mbox: Add GET_SUPPORTED_FEATURES, GET_FEATURE and SET_FEATURE mailbox commands cxl/memscrub: Add CXL device patrol scrub control feature memory: scrub: Add function to show scrub attributes in decimal memory: scrub: Add scrub control attributes for the DDR5 ECS cxl/memscrub: Add CXL device DDR5 ECS control feature cxl: scrub: sysfs: Add Documentation for CXL memory device scrub control attributes .../testing/sysfs-class-cxl-scrub-configure | 135 +++ drivers/cxl/Kconfig | 23 + drivers/cxl/core/Makefile | 1 + drivers/cxl/core/mbox.c | 74 ++ drivers/cxl/core/memscrub.c | 1008 +++++++++++++++++ drivers/cxl/cxlmem.h | 104 ++ drivers/cxl/pci.c | 8 + drivers/memory/scrub/memory-scrub.c | 36 +- include/memory/memory-scrub.h | 11 + include/uapi/linux/cxl_mem.h | 3 + 10 files changed, 1400 insertions(+), 3 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-class-cxl-scrub-configure create mode 100644 drivers/cxl/core/memscrub.c