From: Anisa Su <anisa.su887@gmail.com>
To: linux-cxl@vger.kernel.org
Cc: nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org,
Dan Williams <djbw@kernel.org>, Dave Jiang <dave.jiang@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Jonathan Cameron <jic23@kernel.org>,
Davidlohr Bueso <dave@stgolabs.net>,
Ira Weiny <iweiny@kernel.org>,
Vishal Verma <vishal.l.verma@intel.com>,
Fan Ni <nifan.cxl@gmail.com>, Li Ming <ming.li@zohomail.com>,
Benjamin Cheatham <benjamin.cheatham@amd.com>,
Gregory Price <gourry@gourry.net>,
Richard Cheng <icheng@nvidia.com>,
Anisa Su <anisa.su@samsung.com>
Subject: [PATCH v15 0/8] DCD Prep Series
Date: Wed, 7 Oct 2026 13:16:33 -0700 [thread overview]
Message-ID: <20261007201828.952-1-anisa.su@samsung.com> (raw)
These are the first eight patches of the Dynamic Capacity Device (DCD)
series. They set up: DCD enumeration, CDAT handling for DC partitions,
the event interrupt plumbing, a preparatory refactor, and
documentation of the DPA partition layout. They stand alone and keep DCD
disabled. They are not dependent on the rest of the series.
Patch 1 detects the 48h command set and then leaves mds->dcd_supported
false. The flag is only turned on by the series that adds DCD event
handling, so every DCD specific path added here is shut off at runtime:
cxl_configure_dcd() never runs, no DC partition is created, no DCD
interrupt is armed, and the CXL_PARTMODE_DYNAMIC_RAM paths are
unreachable. The intent is to land the enumeration and plumbing while
the extent to DAX pipeline is still under review.
Based on v7.3-rc6
v14: https://lore.kernel.org/linux-cxl/20260918203049.7273-1-anisa.su@samsung.com/T/#m0b6ade9da2d4fefa8aab3bb7db7c29516bc3f955
v14 -> v15 Changes:
===================
The first and only supported DC partition's DPA resource name is still
dynamic_ram_1 because the partition's sysfs directory comes from the DPA
resource name. So it would show up as /sys/bus/.../dynamic_ram_1/
No sysfs patches are in this series, those come later.
- Patch 1: cxl/mbox: Flag support for Dynamic Capacity Devices (DCD)
- No change.
- Patch 2: cxl/mem: Read dynamic capacity configuration from the device
- Renamed partition mode from CXL_PARTMODE_DYNAMIC_RAM_1 to
CXL_PARTMODE_DYNAMIC_RAM.
The mode should only describe the capacity type, not the number of
the partition. The _1 looks to be an artifact from v8 to v9, when we
went from supporting all 8 partitions down to limiting to 1.
The first and only supported DC partition's DPA resource name is still
dynamic_ram_1 because the partition's sysfs directory comes from the DPA
resource name. So it would show up as /sys/bus/.../dynamic_ram_1/
when the sysfs patches from the rest of the series are added.
- Patch 3: cxl/cdat: Gather DSMAS data for DCD partitions
- Disable DCD when the DC partition has no valid DSMAS entry:
no CDAT, CDAT parse failure, or no entry matching the
partition. A DCD shall describe its DC partition in a DSMAS
(CXL r4.0 9.13.3), so rather than run with unknown attributes
the device keeps its static capacity and loses DCD (Richard,
Dave).
- DSLBIS is optional. cxl_cdat_endpoint_process() treated zero
DSLBIS entries as a parse failure, which with the change above
would have disabled DCD on a device with a perfectly valid
DSMAS. An empty DSLBIS no longer fails the parse, and
cxl_port_perf_data_calculate() skips DSMAS entries that have
no DSLBIS coordinates so the QTG _DSM is never evaluated with
zero bandwidth
- cxl_memdev_apply_dsmas() takes an enum cxl_dsmas_apply
(FLAGS / FLAGS_PERF) instead of a bool so the call sites say
what is applied (Dave).
- The DSMAS read-only flag (CDAT 1.04, Flags bit 6) is recorded
on the partition alongside shareable. (Jonathan)
- Patch 4: cxl/events: Split event msgnum configuration from irq setup
- No code change.
- Patch 5: cxl/pci: Factor out interrupt policy check
- No code change.
- Patch 6: cxl/mem: Configure dynamic capacity interrupts
- CXLDEV_EVENT_STATUS_STANDARD_LOGS names the four standard
logs (INFO | WARN | FAIL | FATAL) that cxl_event_drain_mask()
and the cxl_test mock's probe-time drain spelled out long-hand
(Dave/Jonathan)
- On platforms where BIOS owns the event logs, a failed Get or
Set Event Interrupt Policy now disables DCD instead of failing
the memdev probe. Before this series that path never reached
the mailbox on such a platform; DCD is now the only reason it
does, so a failure there costs DCD, not the device. With OS
owned logs the commands remain fatal to probe as before
(Sashiko).
- Patch 7: cxl/core: Enforce partition order/simplify partition calls
- No change.
- Patch 8: Documentation/cxl: Document DPA partition layout and
ordering rules
- No change.
Review status
=============
Dropped all tested-by tags for patches 1-8
Patch 2: Dropped all Review tags.
Patch 3: Dropped all Review tags.
Patch 6: Dropped all Review tags.
Patch organization
==================
1-3: enumerate DCD command support, read the DC configuration, and pick
up DSMAS data for DC partitions.
4-6: split event msgnum configuration from irq setup, factor out the
interrupt policy check, then configure the DCD event interrupt.
7: preparatory refactor -- enforce partition order while collapsing
the ram/pmem specific partition helpers into one.
8: document the DPA partition layout the previous patches enforce,
and where Linux is stricter than the specification.
Testing
=======
This series leaves mds->dcd_supported false on purpose, so
cxl_configure_dcd(), cxl_dev_dc_identify() and cxl_dc_check() are
unreachable at runtime as posted. The tests below are done with the rest
of the series on top, otherwise testing would not yield any meaningful
results.
HW:
Waiting on results from partner team.
cxl_test:
ndctl's cxl suite against cxl_test (7.3.0-rc6, CXL as modules)
16 of 17 pass, cxl-features.sh skips for lack of FWCTL, and
cxl-dcd.sh passes.
QEMU:
Tested extent add/release and DAX device create/destroy.
Tested that expected errors are printed from malformed Get DC Configuration
payload.
Anisa Su (1):
Documentation/cxl: Document DPA partition layout and ordering rules
Ira Weiny (7):
cxl/mbox: Flag support for Dynamic Capacity Devices (DCD)
cxl/mem: Read dynamic capacity configuration from the device
cxl/cdat: Gather DSMAS data for DCD partitions
cxl/events: Split event msgnum configuration from irq setup
cxl/pci: Factor out interrupt policy check
cxl/mem: Configure dynamic capacity interrupts
cxl/core: Enforce partition order/simplify partition calls
.../driver-api/cxl/linux/cxl-driver.rst | 35 +++
Documentation/driver-api/cxl/maturity-map.rst | 4 +
drivers/cxl/core/cdat.c | 97 +++++-
drivers/cxl/core/hdm.c | 24 +-
drivers/cxl/core/mbox.c | 285 ++++++++++++++++++
drivers/cxl/core/memdev.c | 94 ++++--
drivers/cxl/cxl.h | 14 +-
drivers/cxl/cxlmem.h | 88 +++++-
drivers/cxl/mem.c | 2 +-
drivers/cxl/pci.c | 176 +++++++++--
include/cxl/cxl.h | 29 +-
tools/testing/cxl/test/mem.c | 2 +-
12 files changed, 761 insertions(+), 89 deletions(-)
base-commit: a90ee4305c4a5df72c11b31dacfdc76e00fcf78a
--
2.43.0
next reply other threads:[~2026-10-07 20:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 20:16 Anisa Su [this message]
2026-10-07 20:16 ` [PATCH v15 1/8] cxl/mbox: Flag support for Dynamic Capacity Devices (DCD) Anisa Su
2026-10-07 20:16 ` [PATCH v15 2/8] cxl/mem: Read dynamic capacity configuration from the device Anisa Su
2026-10-07 23:43 ` Alison Schofield
2026-10-07 20:16 ` [PATCH v15 3/8] cxl/cdat: Gather DSMAS data for DCD partitions Anisa Su
2026-10-07 23:45 ` Alison Schofield
2026-10-07 20:16 ` [PATCH v15 4/8] cxl/events: Split event msgnum configuration from irq setup Anisa Su
2026-10-07 20:16 ` [PATCH v15 5/8] cxl/pci: Factor out interrupt policy check Anisa Su
2026-10-07 20:16 ` [PATCH v15 6/8] cxl/mem: Configure dynamic capacity interrupts Anisa Su
2026-10-07 23:46 ` Alison Schofield
2026-10-07 20:16 ` [PATCH v15 7/8] cxl/core: Enforce partition order/simplify partition calls Anisa Su
2026-10-07 20:16 ` [PATCH v15 8/8] Documentation/cxl: Document DPA partition layout and ordering rules Anisa Su
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261007201828.952-1-anisa.su@samsung.com \
--to=anisa.su887@gmail.com \
--cc=alison.schofield@intel.com \
--cc=anisa.su@samsung.com \
--cc=benjamin.cheatham@amd.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=djbw@kernel.org \
--cc=gourry@gourry.net \
--cc=icheng@nvidia.com \
--cc=iweiny@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.li@zohomail.com \
--cc=nifan.cxl@gmail.com \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®