From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=198.175.65.17 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796086707; b=TljhF0e1GUR5j6loIdsLXPHVeTla4aPpn4a7JIgpsJMeFgssFSFHOQtDBkFU+Wk/J0qs xcWDRHc4kMNbmI0cihpl4EfpGzgg6T5Xu/bfCnM/ioyWeVUgqFtr1MeTmBzyJ0+cXewmR JW1a7a62wDJy0MXcZbEko8ijokmU21L8J/W2pXEzei7SvbgwJViVKnq5obP4YVUmoNz2K VjU20BCaiO8T4zrb8kdL7zlQmxGHLm4thktpcse1qeBp4hW2RXuaMkGKqm3hnPtt+fUb9 sDxLx24QIR0sniC36Y6qcunrbKTDUtI5EIyPG9nEb73bhq5jx/EX0PgzA8qjQvajlcg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796086707; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Received: Received:Received:Received:Date:From:To:CC:Subject:Message-ID: References:Content-Type:Content-Disposition:In-Reply-To: X-ClientProxiedBy:MIME-Version:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-Exchange-RoutingPolicyChecked: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; bh=RfLuYWhXLqEwvsWbQy6tfag3Aap5meJ6hbbkfz2g46Y=; b=SgEIdke2FjK7vezTWkpnbAa5IPWNQKvPC1xM5vEPaamJlhy4qe7bVb7O57WJHOm6oUV/ jfOEvaNZrYa3A3ZQ61Y1NEl4F/JjV3LiFO6pQJh+GHlPJjZ3XgL1dNa2w4th8rgN4AIdz hsKRu+k/FRJRdEwtiCDoEtOaOvNAJY8KcpSQVEiM/hw5jrmKJAezrH/SOn7nLn43X9mag /urbgwmLlq/xAorom83pbqKCIxUmk9E6zxl4A0SzLdwUQTso4JX6l80tPkj7HD6IJ3PXz T7UwFJEvvzp7PfH9jrl/eHJMcHA8W0mrTRzlbCWcpsbxP7aDAaM0v37h03/ANlqboZw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=jJElwiSb; arc=pass header.oldest-pass=0 smtp.remote-ip=198.175.65.17 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA0E7606A329; Tue, 1 Dec 2026 00:58:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BA0E7606A329 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=jJElwiSb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796086706; x=1827622706; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=RfLuYWhXLqEwvsWbQy6tfag3Aap5meJ6hbbkfz2g46Y=; b=jJElwiSbCPdDWDlXGiY/SZFynrz4yoWHMsReD44iGY/tFeoMTg4Nb1It G4xPDDcQG0//J6f+L6cV3eyXoKFXuqFbF5o4DQ2lWou+aJy6U9jPRBXzK ZieugGUlA2bzjKEkWXvxlOI0UXwMYXNXpQEB5cKulPFzackXEYCirmNuj yv3tEG1uZMpDmA4rOJ5E0eeZ1aeYM6QqV93c0QuUf7lQGE0x1CboEgR7h fKvmaHoPlIjdUarMJCcrAto7iM/jyvPwoRfabscIpq5YZIFkgL4mJwzAI nmlfOzAAjTxSVrpeOOteYHgVm6tt4BkwRqHgo8thSRLX3gadvtZRosxhu Q==; X-CSE-ConnectionGUID: sEv+rv7WT6SDoBdN9VQEdQ== X-CSE-MsgGUID: FXT0pyQ4S5uMRMy5k3tydA== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4941923" X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208";a="4941923" Received: from fmviesa011.fm.intel.com ([10.60.135.151]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 16:58:25 -0800 X-CSE-ConnectionGUID: BDbxChyKQTa3skiJj8Frqw== X-CSE-MsgGUID: T+WCAyETR1iM0WfxMkx75A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208";a="14838600" Received: from orsmsx901.amr.corp.intel.com ([10.22.229.23]) by fmviesa011.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 16:58:25 -0800 Received: from ORSMSX903.amr.corp.intel.com (10.22.229.25) by ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Mon, 30 Nov 2026 16:58:24 -0800 Received: from ORSEDG903.ED.cps.intel.com (10.7.248.13) by ORSMSX903.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57 via Frontend Transport; Mon, 30 Nov 2026 16:58:24 -0800 Received: from BYAPR05CU005.outbound.protection.outlook.com (52.101.85.53) by edgegateway.intel.com (134.134.137.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Mon, 30 Nov 2026 16:58:23 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ufvh6HQ3AQjfB+hyWPN+hWzWWvhxSlIOI6UI8rop4E9ArtUZz50ZtxwfT1UWLqQshfsjFqjBtcqDMgdXYKYjWk8q+L2c7bdaQqtC05c3krCiwTZsxyytVLpUXPMdVJG9ZmXyqe1PcHsB8o+LOaJDKrrZFMRQpLm1t4Tp1CULsVXMb1G0sOrqRY4PN1vxLLVuQl2u2WbqWxDg/zn7BY43avQtfJ0kZ0HV47Jnc8gpiKyibQ8RGfAXPSuVhmskdeDm5uS49fIV57x/F4lxFvba6V0ImN0xoJXWKLEHdC+ieYTFFs/iHpnHSoliT5L+9vo4dmsHviEsI7teDlB6+b2SGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RfLuYWhXLqEwvsWbQy6tfag3Aap5meJ6hbbkfz2g46Y=; b=o4vl6MU2LfhA7wIemXyM8oY4MHio2SSrFA+cRXBfkILIBlGRYwjTMVCF/mY4VcHJlkIcrPmZv92fW8s4xCLLEO86++5PgP8VCBdiTHsKWZ20Lz5R+bM5lKcHqxiwRg+Z2oXkEDUsM0U+IPNmO0P/4Gk/5qK4Vf38UE5Y+57M9YsFdxynpX7a3Bn0Ure5og7uBOb+6yb07ZqbiyFfBz3EtoJPntR9VQG4iJYEg12Na7Hdk+9q2SmVlkDA7aZHNbCYVoe0dRJsM0eMlBPtZL83eZ/y8P7wjuACRVr+no86Y3SOAC5Kf2B6PzZQX1Nnv2NW3bcWkUyOHZO1yLWvqwl+ew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS4PPF0BAC23327.namprd11.prod.outlook.com (2603:10b6:f:fc02::9) by EA8PPF62652793E.namprd11.prod.outlook.com (2603:10b6:30f:fff5::793) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.12; Tue, 1 Dec 2026 00:58:22 +0000 Received: from DS4PPF0BAC23327.namprd11.prod.outlook.com ([fe80::a1fc:97e0:329a:4aa7]) by DS4PPF0BAC23327.namprd11.prod.outlook.com ([fe80::a1fc:97e0:329a:4aa7%6]) with mapi id 15.21.0662.012; Tue, 1 Dec 2026 00:58:21 +0000 Date: Mon, 30 Nov 2026 16:58:10 -0800 From: Alison Schofield To: Anisa Su CC: , , , Dave Jiang , "Jonathan Cameron" , Davidlohr Bueso , Ira Weiny , Vishal Verma , Fan Ni , Li Ming , Benjamin Cheatham , Gregory Price , Richard Cheng , Anisa Su Subject: Re: [PATCH v1 00/14] DCD CXL Series: Dynamic Capacity extent handling Message-ID: References: <20261104230445.66625-1-anisa.su@samsung.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261104230445.66625-1-anisa.su@samsung.com> X-ClientProxiedBy: MW4PR03CA0356.namprd03.prod.outlook.com (2603:10b6:303:dc::31) To DS4PPF0BAC23327.namprd11.prod.outlook.com (2603:10b6:f:fc02::9) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS4PPF0BAC23327:EE_|EA8PPF62652793E:EE_ X-MS-Office365-Filtering-Correlation-Id: 27628ff8-e27b-45d9-d96c-08df4f463189 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|23010399003|376014|7416014|10067099003|56012099006|261028144727099003|260925021911599003|260925022911599003|260925021311599003|261021121427099003|261022075727099003|261022105027099003|261026140227099003|261021123027099003|261102123227099003|261026121527099003|261009223027099003|6133799003|22082099003|18002099003|11063799006|5023799004; X-Microsoft-Antispam-Message-Info: ByK84nRuB0Zm8wRC7c6gLeoG6i0l3rnipqD/BQSZT2fyyZQ69kIwx06fktr7DVu9XVmYht3xGmNSFtxcpn8lYAvayP3/omv1bY1dSUOh2UGzKdYSyRRQBtaO/+9CKRJwW2zfWE/OY6ciO6pQskMY0irsnRCOlYSWh82tZtdmobkBYhW8vfcuDlRDAud/yg2tdedBrzBSDQ3/piH/enTPFVIborLnQcHUcraLYLnal8t0MyLoz3hA21hVHc6iOji6K4k/HpHm4GTB3U+7FWTlHk2u+EsdXCRzIutUjWFEshMsCNpnjXPJSlmkIiiQ6AH5cJ3EM3s9zpy8x8xPZDkRMdNo8JUIRzFA2nqdMo4HeTJIO2pk2bN6/zcOpmKpu6lP0eLxzOo25Om06ywLoKPfNCDtxTFKDBu+EGFIO6uFStjW9PihSAnfa+Trm71AiqRL+lXFKhVda8cwbFLPO+xlwe+WwD7RNHa1c3+06P7V4t1gK7lyKmKFOx4Z8iGHI+j/eDIE7QsOSm6NLNikrZYTI5QVlQJL+AJH/1fPGtMrOZUVl1QtFLq31sBswuBQtdvqGKA+rmqQOsePvOKGKgRt2JEiD+js0KlvGz85I+fkC/L5sDZqC1VbR1G3inD+kP4tKlnlBJUPDbp7Cm407qm9aCzBP/gxmdpHZynBgIejno4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS4PPF0BAC23327.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(23010399003)(376014)(7416014)(10067099003)(56012099006)(261028144727099003)(260925021911599003)(260925022911599003)(260925021311599003)(261021121427099003)(261022075727099003)(261022105027099003)(261026140227099003)(261021123027099003)(261102123227099003)(261026121527099003)(261009223027099003)(6133799003)(22082099003)(18002099003)(11063799006)(5023799004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?f05+SEvL/c8rp9Nfv5qyVNzed0ttkQxeZex+AR1rLr/gRiyhvYeCUAdCJrEa?= =?us-ascii?Q?QchxW8GHVYmsd8CV6AH0N071dKIGbr88iBepQ9GRw6SAM5dSlgyN/iEjFUsG?= =?us-ascii?Q?uJ0XbW6J3Hx0mXw1D954HW0poK2GT36OD9O6UXuu8TG03saqEGBwzmM/sKlh?= =?us-ascii?Q?d6y0fi2JdHYH67Cm8bASWfKzDsk6k9eLcRa3hYls6lF2CP0zp/oVr7oBlyyc?= =?us-ascii?Q?vRuP4OKZoP1exJMP40NpvOSf8N7g4mGsd/LQQWuHKzLdsZpwqvhojCzr3fgN?= =?us-ascii?Q?y05FsnWw5fspNVr9OJRZdjXq4Y8XWwbv3pZskx2Drkho7ARmmY+i8Or3ThEe?= =?us-ascii?Q?n3YsdC6Mo/FUO2Q4df++6R9k9u8oWrS388PdyXobvcMu7kCyKjJ9jxSGadWy?= =?us-ascii?Q?zOqMvtAMWPATe6EU92iT8G39fLRYG9VkdQFmlaBQarqvQ7jfYkcRG/p4CXCy?= =?us-ascii?Q?LmTxJme9O3EXfdmz4lDu0UCfqgfhP+TNObp0RuJMRH+UtuNU9LqKNlqYtqRj?= =?us-ascii?Q?J0szDrqohbxIAxEb2zB108PRphJhR3XnUHRtuZnKSa06JJ7aG/CqDI522e2y?= =?us-ascii?Q?j8z32X2SerLXKh5TshIeuZjBdEOrRNAz58onG9OOpDGrEj/RAdwU28z4Po+m?= =?us-ascii?Q?ty9/VaxutU7a/kqORHWlMoYWJaCNoOzuYTeTm7BPOh1+lgbRhBjCscDJh60J?= =?us-ascii?Q?otg5aF4KW+1Ef4BeJIvI0IX+lk+0G6crs65ksy7yX0SfS1rBqKDigpTMXTHn?= =?us-ascii?Q?qXQMY9epAzLwQdBkb+ziJG1cvHyNhC04ekY/5vagKhbEUXcR8gbRhd9qHGKg?= =?us-ascii?Q?/A7pRDbkZujlusMUdzM4OdWRSQI6VSjE+jdFyTcMnuKa8eI8o4ukFMsvExvm?= =?us-ascii?Q?N6bAS3fY3PLqTgwfb/0hzIMNSHPTUQA65xk9oQwECGpmhN4FgqsPMQlTkHVx?= =?us-ascii?Q?geLdg3AwOkhBKBzxulq3QobI9TEJgG1JeJrzuqLmO4Hk9KYpcqb+Ubv4jnEd?= =?us-ascii?Q?eLWHVVAMkNu5XlUQNBTtciegw/F1NilQdWi6j345U+Hqox268S0Cw0FWfWqB?= =?us-ascii?Q?cJrVmttG9LWvH+/cZGnWtFif6xI7AWaVJttL7nDl4sUtQiKIj3OpbL9tcFl0?= =?us-ascii?Q?W2xPPSIVU1Ra4HZS7SWTVs6NGZfsxVC3nbvveI8CZfXKRzkUWdIEA2pQj07H?= =?us-ascii?Q?7LjttNvRv/Wf0J7OW0jl9rdjPLn5JFygTiig4ZzoUPozszSEpbzxbgSR0Whj?= =?us-ascii?Q?rmXdEDcor+tE7rrdB3ORv9wWJMJn7zqNs37PgUv1H7HgzTRRmKt9L11xGaIg?= =?us-ascii?Q?EOIBYRTynnTQqf9eH2leDjV4AnRhP6aN49ukh7PliHDEmS0OAto3I81eofeZ?= =?us-ascii?Q?VEYH8OgPOSCAy1Bd7JWnUPEWJbuSavei4lx2hnMZ7rb+AuaUq0Slhh1qTjT8?= =?us-ascii?Q?mlpgchEUXScfia7YQzlJle2VJmtKBw0Dv7Eu0TD21Nd52Ec2zeQi+HP0iIqq?= =?us-ascii?Q?2CF1/nzynT862IxH7A1dA+6IanBZ1J1qOXvPx8Fnwkg6osDp3Qxyvm04kM99?= =?us-ascii?Q?FYDeWN5QeMiUr1DAUW9SNW9F3ALRbnnvuuvYEwo+ZMPRPDhYJ7t/sicubRUh?= =?us-ascii?Q?TWnOXf8LvnUcRuKj1ElcX2tKK0xN1Kxi9edF1hvHe3eLMrRj8dfzq3j3O0Mi?= =?us-ascii?Q?QFLoeaxSrJujKYW/ABHamYM8X0YdMS1S/ckhy/6Y3Qy06E1zAeIClCSFRiIV?= =?us-ascii?Q?tPDpir1Ryq1e/ZVGel8UtYahVqAsllA=3D?= X-Exchange-RoutingPolicyChecked: mqHsxE1oRFZ07W3pwk2hctWNESrElTqf1vz1lk5E+1FoM/i/Rg16otpe1RBt7Vyc0+hqBXOa2NX/mbCuzrJv7GAFgClwILssTMrYaz2VqmH+BD9xwri+d/PLqCRbDsiDbP3sxtD8iI2xH0BzB9WlDMLL2ZjI1ZcpbFx7O7vtkz14oE4bfIDoreKOKzIuLYeVNBlCMIrikgJumYZkX6Ujmd8KQQwMJEkmso1De97H7zQkrMRhtnTvsrvSlQQhkqxfxYqgiCEBnxzdwjd0gG6VUy5T9G1A37U2pS79KZ4CyeVOG8aXbM76s5R6YyB66aI/4zcNSUZaSmx4HpN5fJq16A== X-MS-Exchange-CrossTenant-Network-Message-Id: 27628ff8-e27b-45d9-d96c-08df4f463189 X-MS-Exchange-CrossTenant-AuthSource: DS4PPF0BAC23327.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2026 00:58:21.7171 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8ovjxWrOummzfZ626jTYEOKWk1K6M2RzEvawVG8n7GlfpqovmTsbCwJ0Oz6UlLqxpeqWhGRTEsqoVMvHiRx7n2MJGIA83EE2uwb+R9YovxI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: EA8PPF62652793E X-OriginatorOrg: intel.com On Thu, Nov 05, 2026 at 08:02:24AM +0900, Anisa Su wrote: > As discussed previously, the remaining DCD series will be split for > reviewability. I made the following split: Describing the split is important, yet I'd still like a blurb for those not reading the history. ie - say what Dynamic Capacity Devices are, what the kernel cannot do with them today, then what this half adds (as you write below). > > DCD CXL Core half (current series) enables: > - pointing an endpoint decoder at a DC partition > - creating dax_cxl region for DCD (0-sized until resources added) > - processing Add / Release Capacity events > - sending DC Add/Release Response back to the device. > > DCD stays disabled here too. The follow up: > > DCD DAX Series: > - create dax_resources from accepted extents > - build DAX devices from tag groups > - prevent opening devdax w/write permission on read-only partition > - expose tag_groups / extents in sysfs, > - create_dynamic_ram*_region root decoder files for manual region creation > - tools/testing/cxl additions for DCD > - enable DCD > > ^ NDCTL set goes with this one > > Nothing in this series is reachable at runtime as posted: with > dcd_supported false no DC partition exists, the decoder mode store > refuses the dynamic_ram modes, no DC region can be created, and no > DCD event is ever read. The intent is to get the extent handling > reviewed on its own while the DAX side follows. Testing below is done > with the full series. > I'll start a separate thread on testing this series (since nothing here is reachable). > Patch Organization > ================== > 1: (helper) region search returns the endpoint decoder for a DPA. > 2: Add dynamic_ram* endpoint decoder modes. > 3: Set up DC DAX region: 0-size seed device, with 0 HPA until extents > are added as children > 4-5: Set up event handler pipeline with stubbed add/release logic > 6-10: Add Capacity: Fill in add logic, introduce cxl_dc_tag_group / > dc_extent objects, verify extent alignement, shared_extn_seq, > check tag uniqueness, etc. > 11: Release Capacity: release tag groups as a whole, send Release > DC response. > 12: Recover existing extents when a DC region's dax_region probes > 13: Rrace event for Dynamic Capacity event records. > 14: Documentation of the extent handling. > > It will probably be useful to read over patch 14 (documentation) first > which explains how tags/shared extent sequence #s are handled. > > > [RFC] Sysfs interface > ===================== > Since the sysfs interface spans both series, it's described here as > a whole so the decoder modes in patch 2 can be read in context. The > whole section is RFC, but especially endpoint decoder mode and the > root decoder create region files. > > Memdev partition (exposed in follow up series): > memX/ram/{size,qos_class} > memX/pmem/{size,qos_class} > memX/dynamic_ram_1/{size,qos_class,shareable,read_only} > > Currently, only 1 DC partition is supported, but multiple would look > like this: > memX/dynamic_ram_1/{size,qos_class,shareable,read_only} > memX/dynamic_ram_2/{size,qos_class,shareable,read_only} > ... > memX/dynamic_ram_8/{size,qos_class,shareable,read_only} > > dynamic_ram_X tells users which index they are looking at. > > * Endpoint decoder mode (patch 2): > decoderX.Y/mode/{dynamic ram | s/dynamic ram/dynamic_ram Note this is correct as 'dynamic_ram' in actual ABI file, just not here for reader. > dynamic_ram_shared | > dynamic_ram_ro | > dynamic_ram_shared_ro} > > The code exists in the current series, but is not exposed because > dcd is turned off. It is necessary to keep in the current series > rather deferred for the follow up because extents need a parent > DAX_CXL region that is dc-capable, which requires an endpoint decoder with > dynamic_ram* mode > > A decoder's DPA is allocated from a DC partition by writing one > of dynamic_ram, dynamic_ram_shared, dynamic_ram_ro or > dynamic_ram_shared_ro to decoderX.Y/mode. We only support 1 DC > partition today, so it must match the partition's read_only > and shareable attributes exactly. But for multiple, the intent > is to iterate over DC partitions and find the first one that > matches. If none match, it's refused with -ENXIO. Code returns -EINVAL from cxl_dpa_set_part(), the same for an unknown string. -ENXIO is only from mode_store() we DCD disabled. > > So users can specify "I want to use the shareable partition", or > "I want to use the read_only partition". > > But if there were a device with multiple DC partitions that have > the same shareable/read-only attributes, the user will not be > able to select the specific partition. > > So the other choice is to have dynamic_ram_{1-8} as the possible > modes (so in this series with only the first partition enabled, > the only choice would be dynamic_ram_1). > > * Root decoder create files & region mode (in follow-up series): > decoder0.0/create_dynamic_ram_region | > create_dynamic_ram_shared_region | > create_dynamic_ram_ro_region | > create_dynamic_ram_shared_ro_region > > regionX/mode/{dynamic ram | > dynamic_ram_shared | > dynamic_ram_ro | > dynamic_ram_shared_ro} > > The decoder0.0/create_dynamic_ram_* fixes the region's mode at creation, > and every endpoint decoder attached must match the same mode. > > The alternative is to have a single file: > decoder0.0/create_dynamic_ram > > which will create regionN with no mode. The mode is set when endpoint > decoderX.Y is written to target0 by inheriting the decoder's mode. > > Tag Groups & Extents (in follow-up series) > > dax_regionX/tag_groupX.Y/{uuid,size} > /extentX.Y/{offset,length[,shared_extent_seq]} Should directory layout be described here? > > dax_regionX/untagged/{uuid (0000-000....)}/ > extentX.Y/{offset,length} > > Accepted capacity appears under the region's dax_regionX grouped by tag. > Under each tag_groupX.Y directory, is the group's UUID, combined size > of all extents in the group, and each extentX.Y in the group. > Each extentX.Y shows its offset, length, and if shared: shared_extn_seq. The attribute is shared_extent_seq in the tree above and shared_extn_seq here. Match those. A couple of things to tidy up: 1) Some patches are authored as anisa.su887@gmail.com but signed off as anisa.su@samsung.com. Those need to match. 2) shareable vs sharable both are valid spelling, but using only one spelling lets a single grep find every place that deals with it. CXL subsystem already follows CDAT here and uses shareable, so I think as the second comer, DCD should do same. There is a mismash now of uses, please make all shareable. -- Alison > > Untagged extents appear under a general "untagged" directory, with > UUID = null uuid and *no size*, since each untagged extent is its > own logical allocation. > > Git Info: > ========= > Based on v7.4-rc1. > > GitHub branches: > this series: https://github.com/anisa-su993/anisa-linux-kernel/tree/dcd-cxl-v1 > DAX series: https://github.com/anisa-su993/anisa-linux-kernel/tree/dcd-dax-v1 > > NDCTL: > https://github.com/anisa-su993/anisa-ndctl/tree/dcd-v8 > > Testing > ======= > Build: every patch of the series builds drivers/cxl and drivers/dax > with CONFIG_CXL_REGION=y and =n. > > NDCTL cxl_test: > - no regressions > - cxl-dcd.sh also passing although ndctl set is not posted with this series and > the tools/testing changes for mock DC regions is in the follow-up series > > Hardware: a DCD with one sharable, writable 128 GiB DC partition: > [ 26.524021] cxl_core:cxl_get_dc_config:2377: cxl_pci 0000:0b:00.0: Read 1/1 DC partitions > [ 26.524024] cxl_core:cxl_dc_check:2327: cxl_pci 0000:0b:00.0: DC partition 0 start 0x0 size 0x2000000000 blk_size: 0x10000000 > [ 26.524028] cxl_core:cxl_dev_dc_identify:2473: cxl_pci 0000:0b:00.0: Returning partition 0 0x0 size 0x2000000000 > [ 26.524031] cxl_core:cxl_configure_dcd:778: cxl_pci 0000:0b:00.0: Adding dynamic ram partition; 0x0 size 0x2000000000 > [ 26.524036] cxl_core:add_dpa_res:468: cxl_pci 0000:0b:00.0: DPA(dynamic_ram_1): [mem 0x00000000-0x1fffffffff flags 0x200] > > Test the following driven by a fabric manager over MCTP from the platform BMC (Initiate > Dynamic Capacity Add and Release, prescriptive and tag-based): > > - FMAPI Add (one More-chain): Tag_A{extent_1}, Tag_B{extent_2-4} > - extents 2-4 with shared seq num 0, 1, 2 > > - Create DAX device from extent 1 and try mmap: > anisa@cxlqual:~/ndctl$ > sudo python3 - <<'EOF' > import mmap, os > dev, size = "/dev/dax0.1", 0x80000000 > fd = os.open(dev, os.O_RDWR) > m = mmap.mmap(fd, size) > m[0:8] = b"DCDHEAD!" # first page > m[size - 8:size] = b"DCDTAIL!" # last page > m.close(); os.close(fd) > fd = os.open(dev, os.O_RDONLY) > m = mmap.mmap(fd, size, prot=mmap.PROT_READ) > print(m[0:8], m[size - 8:size]) > m.close(); os.close(fd) > EOF > b'DCDHEAD!' b'DCDTAIL!' > anisa@cxlqual:~/ndctl$ > > Try to add a tag that is already committed: > [ 1119.080597] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x4801 > [ 1119.080646] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 0ms > [ 6606.397305] cxl_core:cxl_mem_get_event_records:2053: cxl_pci 0000:0b:00.0: Reading event logs: 10 > [ 6606.397322] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x0100 > [ 6606.397359] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 0ms > [ 6606.397427] cxl_core:cxl_handle_dcd_event_records:1955: cxl_pci 0000:0b:00.0: DCD event add : DPA:0xb0000000 LEN:0x10000000 > [ 6606.397439] cxl_pci 0000:0b:00.0: Tag 1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081: dropping group, tag already committed (firmware/orchestrator bug) > [ 6606.397451] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x4802 > [ 6606.397484] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 0ms > [ 6606.397491] cxl_core:cxl_clear_event_record:1092: cxl_pci 0000:0b:00.0: Event log '4': Clearing 27 > [ 6606.397497] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x0101 > [ 6606.397536] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 0ms > [ 6606.397544] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x0100 > [ 6606.397569] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 0ms > > Reject untagged extent on sharable partition: > [ 6820.356969] cxl_core:cxl_handle_dcd_event_records:1955: cxl_pci 0000:0b:00.0: DCD event add : DPA:0xc0000000 LEN:0x10000000 > [ 6820.356981] cxl_core:cxl_validate_extent:341: cxl_pci 0000:0b:00.0: DC extent DPA [range 0x00000000c0000000-0x00000000cfffffff] (DCR:[mem 0x00000000-0x1fffffffff])(00000000-0000-0000-0000-000000000000) > [ 6820.356993] cxl_pci 0000:0b:00.0: DC extent DPA [range 0x00000000c0000000-0x00000000cfffffff]: sharable-partition extent has null tag (firmware bug) > [ 6820.357003] cxl_core:cxl_realize_group:1612: cxl_pci 0000:0b:00.0: Tag 00000000-0000-0000-0000-000000000000: dropping group, failed to add extent DPA:0xc0000000 LEN:0x10000000 > [ 6820.357013] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x4802 > [ 6820.357046] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 0ms > [ 6820.357053] cxl_core:cxl_clear_event_record:1092: cxl_pci 0000:0b:00.0: Event log '4': Clearing 28 > [ 6820.357059] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x0101 > [ 6820.357099] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 0ms > [ 6820.357105] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x0100 > [ 6820.357130] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 0ms > > Unbind dax_cxl driver releases extents: > [ 6922.815346] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x4803 > [ 6922.815824] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 1ms > [ 6922.815830] cxl_core:unregister_tag_group:737: extent0.2: DAX region rm extent HPA [range 0x0000000080000000-0x000000008fffffff] > [ 6922.815858] cxl_core:unregister_tag_group:737: extent0.3: DAX region rm extent HPA [range 0x0000000090000000-0x000000009fffffff] > [ 6922.815866] cxl_core:unregister_tag_group:737: extent0.4: DAX region rm extent HPA [range 0x00000000a0000000-0x00000000afffffff] > [ 6922.935361] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x4803 > [ 6922.935542] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 1ms > [ 6922.935547] cxl_core:unregister_tag_group:737: extent0.1: DAX region rm extent HPA [range 0x0000000000000000-0x000000007fffffff] > > Refuse add extents while dax_cxl not bound: > [ 7064.900283] cxl_core:cxl_handle_dcd_event_records:1955: cxl_pci 0000:0b:00.0: DCD event add : DPA:0xc0000000 LEN:0x10000000 > [ 7064.900296] cxl_core:cxl_validate_extent:341: cxl_pci 0000:0b:00.0: DC extent DPA [range 0x00000000c0000000-0x00000000cfffffff] (DCR:[mem 0x00000000-0x1fffffffff])(55555555-5555-5555-5555-555555555555) > [ 7064.900313] cxl_core:__cxl_dpa_to_region:3137: cxl decoder9.0: dpa:0xc0000000 mapped in region:region0 > [ 7064.900320] cxl_pci 0000:0b:00.0: DC extent DPA [range 0x00000000c0000000-0x00000000cfffffff]: dax driver not ready, refusing > [ 7064.900327] cxl_core:cxl_realize_group:1612: cxl_pci 0000:0b:00.0: Tag 55555555-5555-5555-5555-555555555555: dropping group, failed to add extent DPA:0xc0000000 LEN:0x10000000 > [ 7064.900337] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x4802 > [ 7064.900370] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 0ms > [ 7064.900377] cxl_core:cxl_clear_event_record:1092: cxl_pci 0000:0b:00.0: Event log '4': Clearing 33 > [ 7064.900384] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x0101 > [ 7064.900453] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 1ms > [ 7064.900461] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x0100 > [ 7064.900486] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 0ms > > ------ Reboot -------- > > Read previously accepted extents on reboot: > [ 26.570494] cxl_pci:cxl_event_config:801: cxl_pci 0000:0b:00.0: Event config : BIOS DCD supported > [ 26.872701] cxl_core:cxl_bus_probe:2412: cxl_pmu pmu_mem0.0: probe: 0 > [ 27.514742] cxl_pci:__cxl_pci_mbox_send_cmd:264: cxl_pci 0000:0b:00.0: Sending command: 0x4801 > [ 27.514797] cxl_pci:cxl_pci_mbox_wait_for_doorbell:75: cxl_pci 0000:0b:00.0: Doorbell wait took 0ms > [ 27.514826] cxl_core:cxl_read_extent_list:2546: cxl_pci 0000:0b:00.0: Got extent list 0-3 of 4 generation Num:10 > [ 27.514829] cxl_core:cxl_read_extent_list:2570: cxl_pci 0000:0b:00.0: Processing extent 0/4 [range 0x0000000000000000-0x000000007fffffff] (e5407b12-9a68-4c31-8d5e-2f0916bd73a4) seq 0 > [ 27.514833] cxl_core:cxl_read_extent_list:2570: cxl_pci 0000:0b:00.0: Processing extent 1/4 [range 0x0000000080000000-0x000000008fffffff] (1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081) seq 0 > [ 27.514836] cxl_core:cxl_read_extent_list:2570: cxl_pci 0000:0b:00.0: Processing extent 2/4 [range 0x0000000090000000-0x000000009fffffff] (1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081) seq 0 > [ 27.514838] cxl_core:cxl_read_extent_list:2570: cxl_pci 0000:0b:00.0: Processing extent 3/4 [range 0x00000000a0000000-0x00000000afffffff] (1b2c3d4e-5f60-4718-9a2b-3c4d5e6f7081) seq 0 > [ 27.514843] cxl_core:cxl_validate_extent:341: cxl_pci 0000:0b:00.0: DC extent DPA [range 0x0000000000000000-0x000000007fffffff] (DCR:[mem 0x00000000-0x1fffffffff])(e5407b12-9a68-4c31-8d5e-2f0916bd73a4) > [ 27.514849] cxl_core:__cxl_dpa_to_region:3137: cxl decoder9.0: dpa:0x0 mapped in region:region0 > [ 27.514852] cxl_core:cxl_add_extent:570: cxl decoder9.0: Add extent [range 0x0000000000000000-0x000000007fffffff] (e5407b12-9a68-4c31-8d5e-2f0916bd73a4) > [ 27.514855] cxl_core:cxlr_add_extent:496: cxl_dax_region dax_region0: Alloc new tag group > [ 27.514873] cxl_core:online_tag_group:842: extent0.1: dc_extent HPA [range 0x0000000000000000-0x000000007fffffff] (e5407b12-9a68-4c31-8d5e-2f0916bd73a4) > [ 27.514875] cxl_core:cxlr_notify_extent:470: cxl_dax_region dax_region0: Notify: type 0 tag e5407b12-9a68-4c31-8d5e-2f0916bd73a4 > > > Anisa Su (5): > cxl/port: Add dynamic capacity options to endpoint decoder mode > cxl/mem: Add 20 second timeout for stalled DC event chains > cxl/mem: Enforce tag-group semantics > cxl/extent: Enforce cross-region tag uniqueness > Documentation/cxl: Document DCD extent handling > > Ira Weiny (9): > cxl/core: Return endpoint decoder information from region search > cxl/region: Add dynamic DAX region support > cxl/mem: Introduce DC event handlers > cxl/extent: Handle DC Add Capacity events > cxl/mem: Drop misaligned DCD extent groups > cxl/extent: Validate DC extent partition > cxl/extent: Handle DC Release Capacity events > cxl/region: Read existing extents on region creation > cxl/mem: Trace Dynamic capacity Event Record > > Documentation/ABI/testing/sysfs-bus-cxl | 30 +- > .../driver-api/cxl/linux/cxl-driver.rst | 181 +++ > Documentation/driver-api/cxl/maturity-map.rst | 2 +- > drivers/cxl/core/Makefile | 2 +- > drivers/cxl/core/core.h | 105 +- > drivers/cxl/core/extent.c | 754 ++++++++++++ > drivers/cxl/core/hdm.c | 21 +- > drivers/cxl/core/mbox.c | 1073 ++++++++++++++++- > drivers/cxl/core/memdev.c | 4 +- > drivers/cxl/core/port.c | 55 +- > drivers/cxl/core/region.c | 74 +- > drivers/cxl/core/region_dax.c | 131 +- > drivers/cxl/core/trace.h | 79 +- > drivers/cxl/cxl.h | 121 ++ > drivers/cxl/cxlmem.h | 84 ++ > drivers/cxl/pci.c | 20 +- > drivers/dax/bus.c | 23 + > drivers/dax/bus.h | 1 + > drivers/dax/cxl.c | 40 +- > include/cxl/event.h | 37 + > tools/testing/cxl/Kbuild | 5 +- > 21 files changed, 2792 insertions(+), 50 deletions(-) > create mode 100644 drivers/cxl/core/extent.c > > > base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 > -- > 2.43.0 >