[NDCTL PATCH v7 0/5] Dynamic Capacity additions for cxl-cli

From: Anisa Su

Date: Thu Jun 25 2026 - 08:17:07 EST


CXL Dynamic Capacity Device (DCD) support is currently being worked on
in the kernel. cxl-cli requires modifications to interact with those
devices.

A new partition type 'dynamic_ram_1' has been added which cxl-cli needs
to know about. Add support for the new decoder type.

With DCD, regions may or may not have capacity. The capacity is
communicated via extents. Add region extent query capabilities, and a
'daxctl create-device --uuid' option to claim those extents into a dax
device on a sparse region.

Add cxl-test support. cxl-testing allows for quick regression testing
as well as helping to design the cxl-cli interfaces.

This series applies on top of cxl/pending (5fcbbee, "test/daxctl-famfs.sh:
Add nfit_test famfs mode-transition test").

Series Branch: https://github.com/anisa-su993/anisa-ndctl/tree/dcd-2026-06-24
Kernel Branch: https://github.com/anisa-su993/anisa-linux-kernel/tree/dcd-v11-06-23-26

Changes since v6
================

Structure / process
- libcxl, cxl/region: squashed the Dynamic RAM 1 library support together
with its cxl-cli user into a single patch, so the new API and its first
caller are reviewable together (Dave Jiang).
- Added the missing Signed-off-by lines, and picked up Dave Jiang's
Reviewed-by on the Dynamic RAM 1 and cxl-test patches.
- Rebased onto current cxl/pending

Library versioning
- libcxl: the new exported symbols now live in a fresh version node
(LIBCXL_13) instead of being appended to the already-released LIBCXL_9
(Richard Cheng, Dave Jiang).
- daxctl: daxctl_dev_set_uuid() moved to a new LIBDAXCTL_12 node (famfs
support took LIBDAXCTL_11 on pending).

Bug fixes
- libcxl: free the per-region extent list in free_region(); the extents
allocated while scanning were previously leaked when the region was
freed (Dave Jiang).
- libcxl: removed the unused CXL_REGION_EXTENT_TAG define (Dave Jiang).
- daxctl: daxctl_dev_set_uuid() now propagates the real error - a
negative snprintf() return and the errno from sysfs_write_attr() /
sysfs_read_attr() - instead of masking everything as -ENXIO, so e.g.
the -ENOENT returned when a uuid matches no extent reaches the caller
(Dave Jiang).
- cxl/test: pass the (now required) tag argument to remove_extent() in
test_event_reporting() (Dave Jiang).
- probe-ordering race seen on v7.1-rc1+ (kernel commit 39aa1d4be12b) is
fixed kernel-side by moving existing-extent processing into
cxl_dax_region_probe().
- The other failure reported in cxl-security.sh reported by Alison
in the last version is an unrelated, pre-existing hex/decimal bug being
fixed separately:
https://lore.kernel.org/linux-cxl/ddc1d44c-37ef-473e-9f87-efe207d8bcbf@xxxxxxxxx/T/#t

Output
- cxl/region: the region-query extent listing emits "uuid" (matching the
commit-log example), and is omitted entirely for non-DC RAM/PMEM
regions rather than emitting an empty "extents": [] (Alison Schofield,
Richard Cheng).

Signoffs
- Update Ira's author/signoff to iweiny@xxxxxxxxxx

base-commit: 5fcbbee57319e718bf522436ea6595bd0f71296c

Anisa Su (1):
daxctl: Add --uuid option to create-device for sparse regions

Ira Weiny (4):
libcxl, cxl/region: Add Dynamic RAM 1 partition mode support
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 | 70 +
cxl/json.h | 3 +
cxl/lib/libcxl.c | 186 +++
cxl/lib/libcxl.sym | 13 +
cxl/lib/private.h | 13 +
cxl/libcxl.h | 21 +-
cxl/list.c | 3 +
cxl/memdev.c | 4 +-
cxl/region.c | 27 +-
daxctl/device.c | 72 +-
daxctl/lib/libdaxctl.c | 53 +
daxctl/lib/libdaxctl.sym | 5 +
daxctl/libdaxctl.h | 1 +
test/cxl-dcd.sh | 1275 +++++++++++++++++
test/meson.build | 2 +
util/json.h | 1 +
20 files changed, 1799 insertions(+), 27 deletions(-)
create mode 100644 test/cxl-dcd.sh

--
2.43.0