Linux CXL
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Alison Schofield <alison.schofield@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	Dave Jiang <dave.jiang@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <iweiny@kernel.org>, Li Ming <ming.li@zohomail.com>,
	Robert Richter <rrichter@amd.com>,
	linux-cxl@vger.kernel.org
Subject: Re: [PATCH v5 7/7] cxl/test: Add a topology to test mixed-granularity regions
Date: Tue, 8 Sep 2026 01:10:15 +0100	[thread overview]
Message-ID: <20260908011015.235b7a24@jic23-huawei> (raw)
In-Reply-To: <762061594706e626bf41c2cbae773f49e34d1a29.1788475206.git.alison.schofield@intel.com>

On Thu,  3 Sep 2026 16:23:49 -0700
Alison Schofield <alison.schofield@intel.com> wrote:

> Add a cxl_test topology for mixed-granularity region testing.
> 
> modprobe cxl_test mixed_gran_regions=1 creates three host bridges, two
> root ports per host bridge, one switch per root port, and two endpoints
> per switch, for twelve endpoints total.
> 
> Two root ports per host bridge is what makes the interleaving levels
> selectable. A region built from one endpoint per root port interleaves
> at the host bridge and passes through the switch; a region built from
> both endpoints below a single root port passes through the host bridge
> and interleaves at the switch; a region using every endpoint
> interleaves at both. The CXL Specification lists those as distinct
> legal configurations, so the choice of member endpoints, rather than a
> second topology, selects which one is under test.
> 
> Three CFMWS windows are added:
> 
> 1) A 2-way window at 4K over two host bridges, hosting an 8-way region
> at 1K and a 4-way region at 2K.
> 
> 2) A 3-way window at 512 over three host bridges, hosting a 6-way
> region at 256: CXL 4.0 Table 9-7 rows 2 and 3.
> 
> 3) A 3-way window at 1K over three host bridges, hosting a 12-way
> region at 256: CXL 4.0 Table 9-6 row 7. That row is the composition
> the documentation contrasts with the unsupported row 6, and reaching it
> needs a root granularity four times the region granularity.
> 
> Each window also hosts a same-granularity region at its own ways and
> granularity. The 2-way window at 4K hosts 4-way and 8-way regions at 4K as
> well; the span identity allows the 3-way windows only their own width.
> 
> Register every mock device through cxl_mock_platform_device_add() so
> the mock array is populated before platform_device_add(), matching the
> ordering the rest of cxl_test relies on to avoid the endpoint-probe
> race in commit d90f236f8b9e ("cxl/test: Update mock dev array before
> calling platform_device_add()").
> 
> NULL-check the legacy topology arrays in the mock device and mock port
> lookups, which are left empty when mixed_gran_regions=1 selects the new
> topology.
> 
> The default and existing special module params are unaffected.
> 
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Hi Alison,

Sorry, no tag for this, but just because I can't remember enough about
how the tests work (if I ever really understood!) and don't want to
spend the rest of today working it out again :(  
FWIW, I didn't spot anything wrong from a quick look but I'm not feeling
confident to review this.

Jonathan

      reply	other threads:[~2026-09-08  0:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 23:23 [PATCH v5 0/7] cxl: Support mixed-granularity region interleaves Alison Schofield
2026-09-03 23:23 ` [PATCH v5 1/7] Documentation/cxl: Describe mixed-granularity regions Alison Schofield
2026-09-07 23:23   ` Jonathan Cameron
2026-09-03 23:23 ` [PATCH v5 2/7] cxl/region: Warn on user region position mismatch Alison Schofield
2026-09-03 23:23 ` [PATCH v5 3/7] cxl/region: Generalize endpoint position mapping Alison Schofield
2026-09-07 23:42   ` Jonathan Cameron
2026-09-03 23:23 ` [PATCH v5 4/7] cxl/region: Name the interleave locals in cxl_port_setup_targets() Alison Schofield
2026-09-07 23:50   ` [PATCH v5 4/7] cxo_ol/region: " Jonathan Cameron
2026-09-03 23:23 ` [PATCH v5 5/7] cxl/region: Support mixed-granularity auto regions Alison Schofield
2026-09-08  0:02   ` Jonathan Cameron
2026-09-03 23:23 ` [PATCH v5 6/7] cxl/region: Support mixed-granularity user created regions Alison Schofield
2026-09-08  0:03   ` Jonathan Cameron
2026-09-03 23:23 ` [PATCH v5 7/7] cxl/test: Add a topology to test mixed-granularity regions Alison Schofield
2026-09-08  0:10   ` Jonathan Cameron [this message]

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=20260908011015.235b7a24@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=alison.schofield@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=iweiny@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox