From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f180.google.com (mail-dy1-f180.google.com [74.125.82.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46BA933F59B for ; Sat, 23 May 2026 09:50:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779529852; cv=none; b=q8G3TXZASQPlgivsHJx3ivp6pU5m+ozIFPmkmV/MdXcC0+B1ulf3SUC8vSw4Y9ZRGtbOFT/H3dVf2yPzvHFRnTrQuzX1SPdFwNTA47LosGfvNBjquR9V66Oamx4Ux1WdjtA7l4AnGHvpP08IUfnIqL1mzvRtQR75enyDoOZftyc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779529852; c=relaxed/simple; bh=wpJgigQKuEhvMpP7Og+WZKRi2n7dbupMECmkwtjor90=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=R079AgFAVmbKQaTYx7U3w+1IOTYtsZoVVLQQFhV2p+w1/enmY6sQLIG9sY5bDVBvkJAqgubXjJMzcxGfTiJpnTVAOrcg2W60MoSZwyAKHwyGTu2J1GRI8a4cyUk30UY5pGPbveqKgIfJqdjm10jcxbC5pOEZSp002rsNv/X7j/I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dQe05oYX; arc=none smtp.client-ip=74.125.82.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dQe05oYX" Received: by mail-dy1-f180.google.com with SMTP id 5a478bee46e88-2f68f3b075fso2410659eec.0 for ; Sat, 23 May 2026 02:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779529850; x=1780134650; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=WI8driggD6+32XemxaaLDgZ7NuXnmEQpi6CnLMIKw2o=; b=dQe05oYXU+7HUKdptbRDp3sWSK5EXhoOeb6WkQmF7PPMRtj5s+T2LWq5QPEGTl7E+N ccLNYraE+rgfZNwcpeaMZTtfpMeQ+Setdiej7jCb6ZyDx+9eJhtL6YYy1h2WU2RJgvk2 yrteAlMW4/jrDZEgALRXwwhRVsnwB5WRNYoFWW2jLkel4DZm2ruhxLaqsnDnmMXh2IUg 9GzqQ4wskPF10Xit2n9wdy9j8t2MYCCcSo1Frhv0S9asapg2iQmktQDMg97M/ff3ZbGZ NpLsLoX7/73vbr4sZUDniwTvMHmZ5NcdYuN3fP7aaLQVlT9yG88xk4u88N1AH3eOed82 zKvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779529850; x=1780134650; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WI8driggD6+32XemxaaLDgZ7NuXnmEQpi6CnLMIKw2o=; b=o7kaCMOyfOwepidf8Coi4yH+u78puSMEBTUiJowa0zyM/w9xyQEcOXovF5J2hnhd3R nBivFcpuADR7AncuySrToRvTXflgPOOuwJnLhIGwNSJmhG4TUH4hIakrx1EBVWPx1QzH jhF1sf2c9TUPDAb1l6EgX6g3swmWO9JF/QGV72dWWTQehOeJ4ep89V/HPLIM4Gikc+Rl IXi7bbk916vvwVAgW9F6MV7YzYIoBnU3j0enl0mUIXdi78B2jzzwYscMVovQ18amwHIc cznGzmmcvTeGACW7fTrfGrmPodByZjnOHyJURpoIfquORqMqvr3WCiyYDV4Mop9o2hhD stSg== X-Forwarded-Encrypted: i=1; AFNElJ+FjoXbqfo3pFtzHlm8hnSGGgn6LbC5m15HqqzuluiO7f++fgGD5YCh5c2yHY+gon0/+IBdk6CDAzCwf3w=@vger.kernel.org X-Gm-Message-State: AOJu0YwbB5s4nzMdVpqbfiJNjiLTnhjKhvzIP76jPOSc8L7yAcmDtOb2 6x5aM+pb0UjWNUSi6e2iohHtxxIue8sSseWsXLNDsA453aipv5nAOJ4p X-Gm-Gg: Acq92OGbwCRSX+ITIEMoOkgxZfMGw9/Vrw0SxiCjzZsDmj9GprDzi4M7jhq2pPf2oFP LeK9A4q8OdVw31in0BGKW2C8ow29ceHP4x4Yo1Nh+EKilSF5KvEOXt+7st1jXGzPEHorBR+D/LF j7Zn+I1AFzNAesuMkQ+Ip8RDxMR0VsLVvpJDJ+M2bQcuWlm62dlHcvB5eV0PJLOlqRNLgwlhai0 yx5vYy2BmeLlDkM2hBuqxO1aePkUcRWikwLmcwgxpIQyPzsFYvfihDVLhwdLuo8dV9B9tQ8jS4r r1Osd8xmCc/z1hq/Rpv83kVGd0STrWNeic2TNOUD4RWcFnyh+JVw7uCU7CBaX9F3lvnk7XngYi1 Ld67xR3IASNFNy/D5Y+gtI4a58WPq6EkDdIBP5XA7uvrG6Kts3BAnQBC4s1r3pYI4jWzWgvDoeO ir8aFjDRue3sdQ2M27k+mEf3ipkx4QI7xgrZgnO1K3llZPoc+7jHQNf6Yy9ZAuL5zf+qmRrUWJq zBGa6mqmzKCrtQJLg== X-Received: by 2002:a05:7300:dc83:b0:2c1:6676:5ebd with SMTP id 5a478bee46e88-3044902cee2mr3463901eec.10.1779529850316; Sat, 23 May 2026 02:50:50 -0700 (PDT) Received: from AnisaLaptop.localdomain (c-73-170-217-179.hsd1.ca.comcast.net. [73.170.217.179]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3045225b7b6sm4595756eec.25.2026.05.23.02.50.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 May 2026 02:50:49 -0700 (PDT) From: Anisa Su X-Google-Original-From: Anisa Su To: linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Cc: nvdimm@lists.linux.dev, Dan Williams , Jonathan Cameron , Davidlohr Bueso , Dave Jiang , Ira Weiny , Alison Schofield , John Groves , Gregory Price , Anisa Su Subject: [PATCH v6 0/7] ndctl: Dynamic Capacity additions for cxl-cli Date: Sat, 23 May 2026 02:50:35 -0700 Message-ID: <20260523095043.471098-1-anisa.su@samsung.com> X-Mailer: git-send-email 2.43.0 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 CXL Dynamic Capacity Device (DCD) support has continued to evolve in the upstream kernel since Ira's v5 posting [1]. The kernel side has settled on a uuid-driven claim model for sparse DAX devices: dax_resources carry the tag delivered with each extent, and userspace selects which ones to claim by writing a UUID to the dax device's sysfs 'uuid' attribute (or "0" to claim a single untagged resource). Size on a sparse region is determined by the claim, not requested up-front. This series brings cxl-cli and daxctl in line with that model and extends cxl_test to exercise the new paths end-to-end. The corresponding kernel patchset is here: https://lore.kernel.org/linux-cxl/cover.1779528761.git.anisa.su@samsung.com/T/#t Picked up unchanged from v5 (Ira): libcxl: Add Dynamic RAM A partition mode support cxl/region: Add cxl-cli support for dynamic RAM A libcxl: Add extent functionality to DC regions cxl/region: Add extent output to region query New in v6: daxctl: Add --uuid option to create-device for DC DAX regions - Plumbs writes to the new dax 'uuid' sysfs attribute through a new daxctl_dev_set_uuid() helper (LIBDAXCTL_11). - --uuid is mutually exclusive with --size; pass "0" to claim a single untagged dax_resource. An unmatched UUID surfaces ENOENT from the kernel and leaves the device at size 0. - Documents the option in the man page. cxl/test: Add Dynamic Capacity tests (rewritten on top of Ira's original patch to track the post-redesign kernel) - Routes untagged claims via --uuid "0" so daxctl exercises the kernel uuid_store path; tagged claims use real UUID strings. - Asserts that for DC regions, size-grow returns -EOPNOTSUPP (real grow is --uuid only) and that tag reuse across More-chains is rejected by the cross-More uniqueness gate. - Adds coverage for the new validators: test_uuid_no_match, test_uuid_no_match_seed_intact, test_uuid_show, test_cross_more_uniqueness, test_alignment_rejection. - Sharable-partition coverage (test_shared_extent_inject, test_seq_integrity_gap) is routed at runtime to a dedicated mock memdev that tools/testing/cxl stamps with serial 0xDCDC, so a single cxl_test module load exercises both regimes. - Localizes positional-arg assignments in every helper so functions no longer clobber caller globals (the previous behavior leaked the sharable memdev into later tests). - test_reject_overlapping arithmetic now lands an actual overlap inside the DC region (the prior math landed past the end). Depends on the kernel DCD/sparse-DAX series; without it the new tests will skip and 'cxl list -r N -Nu' will simply report no extents. The branch is also available at: https://github.com/anisa-su993/anisa-ndctl/tree/dcd-2026-05-21 Based on pmem/pending commit: bbd403a test/cxl-sanitize: avoid sanitize submit/wait race [1] https://lore.kernel.org/nvdimm/20250413-dcd-region2-v5-0-fbd753a2e0e8@intel.com/ --- Changes in v6: - anisa: New patch — daxctl --uuid option + daxctl_dev_set_uuid() helper - anisa: Rewrite cxl/test DCD tests against the post-redesign kernel (uuid sysfs claim, tag-group atomic release, cross-More uniqueness, alignment rejection, DC size-grow refusal) - anisa: Rebase onto bbd403a (pmem/pending) - Link to v5: https://lore.kernel.org/nvdimm/20250413-dcd-region2-v5-0-fbd753a2e0e8@intel.com/ Changes in v5: - iweiny: Adjust all code to view only the dynamic RAM A partition - Alison: s/tag/uuid/ in region query extent output - Link to v4: https://patch.msgid.link/20241214-dcd-region2-v4-0-36550a97f8e2@intel.com Anisa Su (1): daxctl: Add --uuid option to create-device for DC regions Ira Weiny (6): ndctl: Dynamic Capacity additions for cxl-cli libcxl: Add Dynamic RAM A partition mode support cxl/region: Add cxl-cli support for dynamic RAM A libcxl: Add extent functionality to DC regions cxl/region: Add extent output to region query cxl/test: Add Dynamic Capacity tests Documentation/cxl/cxl-list.txt | 29 + Documentation/cxl/lib/libcxl.txt | 33 +- Documentation/daxctl/daxctl-create-device.txt | 12 + cxl/filter.h | 3 + cxl/json.c | 67 + cxl/json.h | 3 + cxl/lib/libcxl.c | 181 +++ cxl/lib/libcxl.sym | 9 + cxl/lib/private.h | 14 + cxl/libcxl.h | 21 +- cxl/list.c | 3 + cxl/memdev.c | 4 +- cxl/region.c | 27 +- daxctl/device.c | 72 +- daxctl/lib/libdaxctl.c | 44 + daxctl/lib/libdaxctl.sym | 5 + daxctl/libdaxctl.h | 1 + test/cxl-dcd.sh | 1267 +++++++++++++++++ test/meson.build | 2 + util/json.h | 1 + 20 files changed, 1771 insertions(+), 27 deletions(-) create mode 100644 test/cxl-dcd.sh base-commit: bbd403a03fa2a1551c1a10bbf78f32027c718758 -- 2.43.0