From: Alison Schofield <alison.schofield@intel.com>
To: Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Cameron <jic23@kernel.org>,
Dave Jiang <dave.jiang@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <iweiny@kernel.org>, Dan Williams <djbw@kernel.org>,
Li Ming <ming.li@zohomail.com>, Robert Richter <rrichter@amd.com>
Cc: linux-cxl@vger.kernel.org
Subject: [PATCH 0/6] cxl: Support mixed-granularity region interleaves
Date: Fri, 29 May 2026 17:00:39 -0700 [thread overview]
Message-ID: <cover.1780095671.git.alison.schofield@intel.com> (raw)
A CXL region interleaves across decoder levels (root, optional
switches, endpoint). CXL Spec 4.0 Section 9.13.1 requires only
that each level use a different, consecutive range of HPA bits to
select its target. The driver has historically required equal
region and root decoder granularities. That blocks the legal
mixed-granularity arrangements permitted by Section 9.13.1, and
makes the 6-way and 12-way configurations defined in Section
9.13.1.1 (Tables 9-6, 9-7, and 9-8) impossible to create.
Two prior proposals addressed parts of this gap:
AlisonS added position arithmetic and sysfs gating to allow
auto and user-created regions for the 6-way and 12-way
configurations that have no same-granularity alternative:
https://lore.kernel.org/all/20250306232239.2609017-1-alison.schofield@intel.com/
RobertR introduced an HPA selector-bit model to allow multi-level
regions regardless of granularity ordering for auto regions:
https://lore.kernel.org/all/20251028094754.72816-1-rrichter@amd.com/
This series combines those two approaches into a complete mixed-
granularity implementation. It extends Robert's selector-bit model
from auto regions to user-created regions, extends AlisonS's
position-arithmetic and gating work to all mixed-gran layouts, and
adds the remaining validation needed for both paths. The result is
support for every mixed-granularity arrangement defined by the CXL
specification.
Series structure
----------------
Patches 1 and 2 replace the old granularity ordering rule with
selector-bit validation. Patches 3 and 4 propagate that model through
the remaining region-creation paths. Patch 5 adds cxl_test coverage
for the new layouts. Patch 6 documents the region granularity model
and multi-level interleaving rules.
A companion NDCTL patchset that allows mixed-gran 'cxl create-region'
and adds the unit test is posted separately.
Alison Schofield (6):
cxl/region: Validate interleave selector bits
cxl/region: Derive port granularity from selector bits
cxl/region: Account for mixed-granularity in position calculations
cxl/region: Validate mixed-granularity at sysfs and attach gates
cxl/test: Add a topology to test mixed-granularity regions
Documentation/cxl: Add region granularity and multi-level interleave
guide
Documentation/driver-api/cxl/index.rst | 1 +
.../cxl/linux/region-granularity.rst | 486 ++++++++++++++++++
drivers/cxl/core/region.c | 314 +++++++----
tools/testing/cxl/test/cxl.c | 474 ++++++++++++++++-
4 files changed, 1146 insertions(+), 129 deletions(-)
create mode 100644 Documentation/driver-api/cxl/linux/region-granularity.rst
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
--
2.37.3
next reply other threads:[~2026-05-30 0:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 0:00 Alison Schofield [this message]
2026-05-30 0:00 ` [PATCH 1/6] cxl/region: Validate interleave selector bits Alison Schofield
2026-05-30 0:19 ` sashiko-bot
2026-05-30 0:00 ` [PATCH 2/6] cxl/region: Derive port granularity from " Alison Schofield
2026-05-30 0:26 ` sashiko-bot
2026-06-03 23:51 ` Dave Jiang
2026-05-30 0:00 ` [PATCH 3/6] cxl/region: Account for mixed-granularity in position calculations Alison Schofield
2026-05-30 0:00 ` [PATCH 4/6] cxl/region: Validate mixed-granularity at sysfs and attach gates Alison Schofield
2026-06-03 23:55 ` Dave Jiang
2026-05-30 0:00 ` [PATCH 5/6] cxl/test: Add a topology to test mixed-granularity regions Alison Schofield
2026-05-30 5:17 ` sashiko-bot
2026-06-04 0:04 ` Dave Jiang
2026-05-30 0:00 ` [PATCH 6/6] Documentation/cxl: Add region granularity and multi-level interleave guide Alison Schofield
2026-06-03 23:57 ` Dave Jiang
2026-06-04 3:47 ` kernel test robot
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=cover.1780095671.git.alison.schofield@intel.com \
--to=alison.schofield@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=djbw@kernel.org \
--cc=iweiny@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=ming.li@zohomail.com \
--cc=rrichter@amd.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.