From: Alison Schofield <alison.schofield@intel.com>
To: Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Dave Jiang <dave.jiang@intel.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>
Cc: linux-cxl@vger.kernel.org
Subject: [PATCH v2 0/3] CXL: Add a loadable module for address translation
Date: Fri, 29 Aug 2025 00:21:24 -0700 [thread overview]
Message-ID: <cover.1756446925.git.alison.schofield@intel.com> (raw)
Changes in v2:
- Rebase on cxl/next
This set has dependencies on patches only in cxl/next.
- Make the new helpers static by default, exportable for tests (Dan)
- Restore useful dev_dbg() message for invalid position (Jonathan)
- Create and free cxims data struct in test module (Dan)
- Make some test module comments kdoc's (Jonathan)
- Move a block comment to new helper (Jonathan)
- Remove useless check for ULLONG_MAX (Jonathan)
This series refactors CXL address translation code to support testing
and adds a dedicated test module for validation of the translation
calculations.
The work is presented in 3 patches:
1. Extracts the core translation logic into standalone, testable functions.
2. Provides access to XOR interleave calculations also with a standalone
testable function.
3. Adds the test module that validates both Host to Device, and Device
to Host address translations.
Accessing the core functions in the test module was implemented by
adding the needed core/region functions to cxl_core_exports.c and
adding a similar 'cxl_acpi_exports.c' to access the cxl/acpi.c funcs.
The companion CXL Unit Test script is posted separately.
Alison Schofield (3):
cxl/region: Refactor address translation funcs for testing
cxl/acpi: Make the XOR calculations available for testing
cxl/test: Add cxl_translate module for address translation testing
drivers/cxl/acpi.c | 35 ++-
drivers/cxl/core/region.c | 147 +++++++-----
drivers/cxl/cxl.h | 5 +
include/linux/acpi.h | 7 +
tools/testing/cxl/Kbuild | 2 +
tools/testing/cxl/cxl_acpi_exports.c | 7 +
tools/testing/cxl/cxl_core_exports.c | 12 +
tools/testing/cxl/cxl_test.h | 18 ++
tools/testing/cxl/test/Kbuild | 2 +
tools/testing/cxl/test/cxl_translate.c | 303 +++++++++++++++++++++++++
10 files changed, 467 insertions(+), 71 deletions(-)
create mode 100644 tools/testing/cxl/cxl_acpi_exports.c
create mode 100644 tools/testing/cxl/cxl_test.h
create mode 100644 tools/testing/cxl/test/cxl_translate.c
base-commit: 561c4e30bff93b3c33e694a459f8580f8a6b3c8c
--
2.37.3
next reply other threads:[~2025-08-29 7:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 7:21 Alison Schofield [this message]
2025-08-29 7:21 ` [PATCH v2 1/3] cxl/region: Refactor address translation funcs for testing Alison Schofield
2025-09-04 22:05 ` Dave Jiang
2025-09-09 17:31 ` Alison Schofield
2025-09-09 16:10 ` Jonathan Cameron
2025-09-09 17:45 ` Alison Schofield
2025-09-10 12:32 ` Jonathan Cameron
2025-08-29 7:21 ` [PATCH v2 2/3] cxl/acpi: Make the XOR calculations available " Alison Schofield
2025-09-04 23:21 ` Dave Jiang
2025-09-09 17:33 ` Alison Schofield
2025-08-29 7:21 ` [PATCH v2 3/3] cxl/test: Add cxl_translate module for address translation testing Alison Schofield
2025-09-04 23:24 ` Dave Jiang
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.1756446925.git.alison.schofield@intel.com \
--to=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--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