]> git.ipfire.org Git - thirdparty/linux.git/commit
cxl: Disable HPA/SPA translation handlers for Normalized Addressing
authorRobert Richter <rrichter@amd.com>
Wed, 14 Jan 2026 16:48:29 +0000 (17:48 +0100)
committerDave Jiang <dave.jiang@intel.com>
Wed, 4 Feb 2026 16:17:31 +0000 (09:17 -0700)
commit208f432406b7ed446c061d68cc73efd85b575d3f
tree6cddd2abea91a61b694ece248b11f8b56b65da4e
parentd1c9ba46d6c36ff8d5b5f83ae28eae4132e46988
cxl: Disable HPA/SPA translation handlers for Normalized Addressing

The root decoder provides the callbacks hpa_to_spa and spa_to_hpa to
perform Host Physical Address (HPA) and System Physical Address
translations, respectively. The callbacks are required to convert
addresses when HPA != SPA. XOR interleaving depends on this mechanism,
and the necessary handlers are implemented.

The translation handlers are used for poison injection
(trace_cxl_poison, cxl_poison_inject_fops) and error handling
(cxl_event_trace_record).

In AMD Zen5 systems with Normalized Addressing, endpoint addresses are
not SPAs, and translation handlers are required for these features to
function correctly.

Now, as ACPI PRM translation could be expensive in tracing or error
handling code paths, do not yet enable translations to avoid its
intensive use. Instead, disable those features which are used only for
debugging and enhanced logging.

Introduce the flag CXL_REGION_F_NORMALIZED_ADDRESSING that indicates
Normalized Addressing for a region and use it to disable poison injection
and DPA to HPA conversion.

Note: Dropped unused CXL_DECODER_F_MASK macro.

[dj: Fix commit log CXL_REGION_F_NORM_ADDR to
 CXL_REGION_F_NORMALIZED_ADDRESSING ]

Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Signed-off-by: Robert Richter <rrichter@amd.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260114164837.1076338-14-rrichter@amd.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/atl.c
drivers/cxl/core/region.c
drivers/cxl/cxl.h