Linux CXL
 help / color / mirror / Atom feed
* [PATCH 0/6] cxl: Support mixed-granularity region interleaves
@ 2026-05-30  0:00 Alison Schofield
  2026-05-30  0:00 ` [PATCH 1/6] cxl/region: Validate interleave selector bits Alison Schofield
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Alison Schofield @ 2026-05-30  0:00 UTC (permalink / raw)
  To: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield,
	Vishal Verma, Ira Weiny, Dan Williams, Li Ming, Robert Richter
  Cc: linux-cxl

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-06-04  3:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-30  0:00 [PATCH 0/6] cxl: Support mixed-granularity region interleaves Alison Schofield
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox