CXL: Add a loadable module for address translation
Status from this message: Applied to cxl/next
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest3 patches 1 replyApplied
- v33 patches 3 repliesSuperseded
- v23 patches 8 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 3 patches | 10 replies | Superseded |
Changes in v4 from the cover letter
- Rebase on 6.18-rc1
- Sync to a rename: EXPORT_SYMBOL_FOR_MODULES per a 6.18-rc1 patch
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | cxl/region: Refactor address translation funcs for testingdrivers/ drivers/ | +149 | 0 replies | |
| 2/3 | cxl/acpi: Make the XOR calculations available for testingdrivers/ drivers/ | +43 | 0 replies | |
| 3/3 | cxl/test: Add cxl_translate module for address translation testingtools/ tools/ | +446 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Jonathan Cameron | Dave Jiang |
|---|---|---|
| 1/3 | R-b | R-b |
| 2/3 | R-b | R-b |
| 3/3 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/3] CXL: Add a loadable module for address translation
Changes in v4:
- Rebase on 6.18-rc1
- Sync to a rename: EXPORT_SYMBOL_FOR_MODULES per a 6.18-rc1 patch
Changes in v3:
- Rebase on latest cxl/next
This set is posted for review based on cxl/next because it depends on SPA->DPA translation work only in cxl/next (the poison by region offset set). When cxl/next becomes v6.18-rc1, I'll rebase and resend.
- Replace __mock_exports with EXPORT_SYMBOL_GPL_FOR_MODULES()
- Replace (u64)GENMASK() w GENMASK_ULL() (DaveJ)
- Refactor cxled lookup in cxl_dpa_to_hpa() (DaveJ)
- Move struct cxl_cxims_data to cxl.h (DaveJ)
Below is new functionality in v3:
- Add and EXPORT cxl_validate_translation_parameter().
This consolidates param validation in region.c and exporting it enables testing.
- Add a test of cxl_validate_translation_parameter() to test module.
- Add a random test of the exported CXL Driver translation functions.
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.
The CXL Driver functions are made available to the test module using EXPORT_SYMBOL_FOR_MODULES() for cxl_translate only.
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 | 41 ++- drivers/cxl/core/region.c | 204 ++++++++---- drivers/cxl/cxl.h | 19 ++ tools/testing/cxl/test/Kbuild | 1 + tools/testing/cxl/test/cxl_translate.c | 445 +++++++++++++++++++++++++ 5 files changed, 638 insertions(+), 72 deletions(-) create mode 100644 tools/testing/cxl/test/cxl_translate.c
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
Signature · 1 line
2.37.3