Linux CXL
 help / color / mirror / Atom feed
* [PATCH v2 0/3] CXL: Add a loadable module for address translation
@ 2025-08-29  7:21 Alison Schofield
  2025-08-29  7:21 ` [PATCH v2 1/3] cxl/region: Refactor address translation funcs for testing Alison Schofield
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Alison Schofield @ 2025-08-29  7:21 UTC (permalink / raw)
  To: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield,
	Vishal Verma, Ira Weiny, Dan Williams
  Cc: linux-cxl

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


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

end of thread, other threads:[~2025-09-10 12:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-29  7:21 [PATCH v2 0/3] CXL: Add a loadable module for address translation Alison Schofield
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

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