cxl: Support Poison Inject & Clear by Region Offset
Status from this message: Applied to cxl/next
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest5 patches 3 repliesApplied
- v45 patches 0 repliesSuperseded
- v34 patches 8 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 4 patches | 8 replies | Superseded | |
| v1 | 3 patches | 13 replies | Superseded |
Changes in v5 from the cover letter
Changelog appears per patch also.
Patch 1: Remove stray blank line in cxl_root_decoder_alloc() (DaveJ) Patch 5: Update Documentation/driver-api/cxl/maturity.map
Patches in v5 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | cxl: Move hpa_to_spa callback to a new root decoder ops structuredrivers/ drivers/ drivers/ +1 more | +25 | 1 reply | |
| 2/5 | cxl: Define a SPA->CXL HPA root decoder callback for XOR Mathdrivers/ drivers/ | +18 | 0 replies | |
| 3/5 | cxl/region: Introduce SPA to DPA address translationdrivers/ | +101 | 1 reply | |
| 4/5 | cxl/core: Add locked variants of the poison inject and clear funcsdrivers/ drivers/ | +38 | 0 replies | |
| 5/5 | cxl/region: Add inject and clear poison by region offsetDocumentation/ Documentation/ drivers/ +2 more | +228 | 0 replies |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Jonathan Cameron | Dave Jiang |
|---|---|---|
| 1/5 | R-b | |
| 2/5 | R-b | |
| 3/5 | R-b | |
| 4/5 | R-b | R-b |
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 0/5] cxl: Support Poison Inject & Clear by Region Offset
From: Alison Schofield <[email protected]>
Built upon cxl repo branch cxl/next
A CXL Unit Test update to cxl-poison.sh is posted separately.
Changes in v5:
Changelog appears per patch also.
Patch 1: Remove stray blank line in cxl_root_decoder_alloc() (DaveJ) Patch 5: Update Documentation/driver-api/cxl/maturity.map
Changes in v4:
Changelog appears per patch also.
Add new precursor patch creating a root decoder ops structure (DaveJ) Add /* Input validation ensures valid ways and gran */ (Jonathan) Use a temp instead of modifying hpa_offset in place (Jonathan) Reorder mask addends to match spec definition (Jonathan) Add a blank line, remove a blank line (Jonathan) s/Deivce/Device in commit log (Jonathan)
Use div64_u64_rem() for MOD operation (lkp)
Simplify return in cxl_[inject|clear]_poison() (Jonathan)
Changes in v3:
Check return of ways_to_eiw() & granularity_to_eig() (Jonathan) Collapse a header comment into pos and offset blocks (Jonathan) Calc pos for 3,6,12 using actual ways, not always 3 (Jonathan) Mask off bottom bits in < 8 offset case (Jonathan)
Wrap code comments closer to column 80 (Jonathan)
Use a continue to un-nest a for loop. (Jonathan)
Undo v2 return of rc from locked variants. Return 0. (Jonathan) Return rc from region_offset_to_dpa_result() if present (Jonathan) Remove the errant Documentation/ABI fixup (Jonathan) Add the above rc to the dev_dbg message
Changes in v2:
Rebased onto cxl repo branch for-6.17/cxl-acquire
As the ACQUIRE() set noted, ACQUIRE() syntax leads to a checkpatch
ERROR: do not use assignment in if condition
We'll have to endure that noise here until that set is merged with a checkpatch.pl update or a change to the syntax.
Changelog appears per patch also:
Simplify return using test_bit() in cxl_memdev_has_poison() (Jonathan) Use ACQUIRE() in the debugfs inject and clear funcs (DaveJ, Jonathan) Shift by (eig + eiw) not (eig + 8) in MOD 3 interleaves** (Jonathan) Simplify bottom bit handling by saving and restoring (Jonathan) Return the rc from locked variants in cxl_clear/inject_poison Fail if offset is in the extended linear cache (Jonathan) Calculate the pos and dpa_offset inline, not in a helper Remove the not customary __ prefix from locked variants Added 'cxl' to an existing ABI for memdev clear_poison
Add and use a root decoder callback for spa_to_hpa() Redefine ABI to take a region offset, not SPA (Dan)
Use div64_u64 instead of / to fix 32-bit ARM (lkp)
Use div64_u64_rem instead of % for arch safety
Remove KernelVersion field in ABI doc (Dan)
Pass pointer to results structures (DaveJ)
Add spec references and comments (DaveJ)
Warn against misuse in ABI doc (Dan)
Add validate_region_offset() helper
Begin Cover Letter
This series allows expert users to inject and clear poison by writing a System Physical Address (SPA) to a region debugfs files. At the core of this new functionality is a helper that translates an HPA into a Device Physical Address (DPA) and a memdev based on the region's decoder configuration.
The set is not merely a convenience wrapper for these region poison operations as it enables these operations for XOR interleaved regions where they were previously impossible.
Patch 1 Creates a root decoder ops structure
Patch 2 defines a SPA->CXL HPA root decoder callback for XOR Math. It's a restructuring and renaming exercise that enables the reuse of an existing xormap function in either direction SPA<-->CXL HPA. It gets used in Patch 2.
Patch 3 introduces the translation logic capable of retrieving the memdev and a DPA for a region offset.
Patch 4 adds a locked variant of the inject and clear poison ops to support callers that must hold locks during the entire translation and operation sequence. It gets used in Patch 5.
Patch 5 exposes the capability through region debugfs attributes that only appear when all participating memdevs support the poison commands.
By the end of Patch 5 a region offset has been translated to a memdev and a DPA and can simply be passed through to the pre-existing per memdev inject and clear poison routines.
Alison Schofield (4):
cxl: Define a SPA->CXL HPA root decoder callback for XOR Math cxl/region: Introduce SPA to DPA address translation cxl/core: Add locked variants of the poison inject and clear funcs cxl/region: Add inject and clear poison by region offset
Dave Jiang (1):
cxl: Move hpa_to_spa callback to a new root decoder ops structure
Documentation/ABI/testing/debugfs-cxl | 87 +++++++ Documentation/driver-api/cxl/maturity-map.rst | 2 +- drivers/cxl/acpi.c | 35 ++- drivers/cxl/core/core.h | 4 + drivers/cxl/core/memdev.c | 60 +++-- drivers/cxl/core/port.c | 1 + drivers/cxl/core/region.c | 237 +++++++++++++++++- drivers/cxl/cxl.h | 14 +- drivers/cxl/cxlmem.h | 2 + 9 files changed, 406 insertions(+), 36 deletions(-)
base-commit: f11a5f89910a7ae970fbce4fdc02d86a8ba8570f
Signature · 1 line
2.37.3