From: Dave Jiang <dave.jiang@intel.com>
To: Robert Richter <rrichter@amd.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Davidlohr Bueso <dave@stgolabs.net>
Cc: linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org,
Gregory Price <gourry@gourry.net>,
"Fabio M. De Francesco" <fabio.m.de.francesco@linux.intel.com>,
Terry Bowman <terry.bowman@amd.com>
Subject: Re: [PATCH v1 00/20] cxl: Address translation support, part 2: Region code rework
Date: Mon, 21 Jul 2025 13:59:33 -0700 [thread overview]
Message-ID: <78284b12-3e0b-4758-af18-397f32136c3f@intel.com> (raw)
In-Reply-To: <20250715191143.1023512-1-rrichter@amd.com>
On 7/15/25 12:11 PM, Robert Richter wrote:
> This series is the second part of adding support for CXL address
> translation. It adds another rework of region code to address
> implementation changes or conflicts of current address translation
> code with cxl/next, esp. the introduction of support of extended
> linear caching.
>
> Following parts are currently planned, worked on or finished:
>
> Part 1: Cleanups and refactoring
> Upstream: 68d8b4f399e7 ("Merge branch 'for-6.16/cxl-cleanups' into cxl-for-next")
>
> Part 2: Region code rework
> This initial patch series.
>
> Part 3: Extended linear cache rework
> Not yet posted.
>
> Part 4: Generic support and AMD Zen5 platform enablement.
> Not yet posted. (Earlier version posted as part 2, v2: Generic support
> and AMD Zen5 platform enablement. [1])
Hi Robert, this is A LOT of refactoring and we are not anywhere near the actual translation implementation. Before we proceed further, can you please send out a documentation patch and describe the ZEN5 translation needs for docs/driver-api/cxl/conventions.rst similar to what Fabio is doing for LMH [1]? Thank you!
[1]: https://lore.kernel.org/linux-cxl/687ea20d2e508_34e0f2941@iweiny-mobl.notmuch/T/#t
DJ
>
> The general changes in the implementation compared to [1] are in
> particular to use the attached region of an endpoint decoder to host
> the HPA range and interleaving configuration parameters. That is, the
> region's root decoder and HPA range are added as members @cxlrd and
> @hpa_range to struct cxl_region. Both are introduced to keep track of
> the region's SPA address range and the interleaving configuration.
> Those parameters are the same for all endpoint decoders that share the
> same interleaving setup.
>
> The implementation must ensure that the endpoint decoder's region
> parameters are always valid. All parameters must be determined first
> and then a check must be performed if a region with identical
> parameters already exists. A split of region creation and registration
> is required as the region may not become active and may need to be
> replaced by an already existing region. Several high-level functions
> are introduced (create_region(), setup_region(), register_region(),
> cxl_endpoint_get_region(), cxl_region_find_duplicate()). Most of it is
> implemented in cxl_add_to_region().
>
> Finally, this series adds a lot of simplification and improves error
> handling and code readability.
>
> [1] https://lore.kernel.org/all/20250218132356.1809075-1-rrichter@amd.com/
>
> Robert Richter (20):
> cxl/region: Move helper functions closer to their users
> cxl/region: Store root decoder in struct cxl_region
> cxl/region: Remove region id handling from cxl_region_alloc()
> cxl/region: Add region registration code to new function
> register_region()
> cxl/region: Separate cxl_region_alloc() from devm_cxl_add_region()
> cxl/region: Remove dev_err() from cxl_find_root_decoder()
> cxl/region: Add new function cxl_endpoint_get_region() to simplify
> cxl_add_to_region()
> cxl/region: Rework memregion id allocation and move it to
> register_region()
> cxl/region: Change __construct_region() to use it as a tail function
> call
> cxl/region: Remove __construct_region()
> cxl/region: Separate auto-generated region cration code path
> cxl/region: Remove region creation code from construct_region()
> cxl/region: Move devm_cxl_add_region() out of create_region()
> cxl/region: Prepare removal of @cxlrd argument from create_region()
> cxl/region: Prepare removal of @cxled argument from construct_region()
> cxl/region: Introduce @hpa_range to struct cxl_region
> cxl/region: Remove create_region() call from construct_region()
> cxl/region: Determine root decoder in create_region()
> cxl/region: Add function to find a region's duplicate
> cxl/region: Early check region's interleaving configuration
>
> drivers/cxl/core/region.c | 514 +++++++++++++++++++++++---------------
> drivers/cxl/cxl.h | 4 +
> 2 files changed, 315 insertions(+), 203 deletions(-)
>
>
> base-commit: 12b3d697c812aaf356e82d9e1f351fbb2ea97500
prev parent reply other threads:[~2025-07-21 20:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 19:11 [PATCH v1 00/20] cxl: Address translation support, part 2: Region code rework Robert Richter
2025-07-15 19:11 ` [PATCH v1 01/20] cxl/region: Move helper functions closer to their users Robert Richter
2025-07-15 19:11 ` [PATCH v1 02/20] cxl/region: Store root decoder in struct cxl_region Robert Richter
2025-07-15 19:11 ` [PATCH v1 03/20] cxl/region: Remove region id handling from cxl_region_alloc() Robert Richter
2025-07-15 19:11 ` [PATCH v1 04/20] cxl/region: Add region registration code to new function register_region() Robert Richter
2025-07-15 19:11 ` [PATCH v1 05/20] cxl/region: Separate cxl_region_alloc() from devm_cxl_add_region() Robert Richter
2025-07-21 14:16 ` Joshua Hahn
2025-07-15 19:11 ` [PATCH v1 06/20] cxl/region: Remove dev_err() from cxl_find_root_decoder() Robert Richter
2025-07-15 19:11 ` [PATCH v1 07/20] cxl/region: Add new function cxl_endpoint_get_region() to simplify cxl_add_to_region() Robert Richter
2025-07-15 19:11 ` [PATCH v1 08/20] cxl/region: Rework memregion id allocation and move it to register_region() Robert Richter
2025-07-21 15:06 ` Joshua Hahn
2025-07-15 19:11 ` [PATCH v1 09/20] cxl/region: Change __construct_region() to use it as a tail function call Robert Richter
2025-07-15 19:11 ` [PATCH v1 10/20] cxl/region: Remove __construct_region() Robert Richter
2025-07-15 19:11 ` [PATCH v1 11/20] cxl/region: Separate auto-generated region cration code path Robert Richter
2025-07-15 19:11 ` [PATCH v1 12/20] cxl/region: Remove region creation code from construct_region() Robert Richter
2025-07-15 19:11 ` [PATCH v1 13/20] cxl/region: Move devm_cxl_add_region() out of create_region() Robert Richter
2025-07-15 19:11 ` [PATCH v1 14/20] cxl/region: Prepare removal of @cxlrd argument from create_region() Robert Richter
2025-07-15 19:11 ` [PATCH v1 15/20] cxl/region: Prepare removal of @cxled argument from construct_region() Robert Richter
2025-07-15 19:11 ` [PATCH v1 16/20] cxl/region: Introduce @hpa_range to struct cxl_region Robert Richter
2025-07-15 19:11 ` [PATCH v1 17/20] cxl/region: Remove create_region() call from construct_region() Robert Richter
2025-07-15 19:11 ` [PATCH v1 18/20] cxl/region: Determine root decoder in create_region() Robert Richter
2025-07-15 19:11 ` [PATCH v1 19/20] cxl/region: Add function to find a region's duplicate Robert Richter
2025-07-15 19:11 ` [PATCH v1 20/20] cxl/region: Early check region's interleaving configuration Robert Richter
2025-07-21 0:42 ` [PATCH v1 00/20] cxl: Address translation support, part 2: Region code rework Gregory Price
2025-07-21 20:59 ` Dave Jiang [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=78284b12-3e0b-4758-af18-397f32136c3f@intel.com \
--to=dave.jiang@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=fabio.m.de.francesco@linux.intel.com \
--cc=gourry@gourry.net \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rrichter@amd.com \
--cc=terry.bowman@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;
as well as URLs for NNTP newsgroup(s).