Re: [PATCH v10 13/13] cxl: Disable HPA/SPA translation handlers for Normalized Addressing

From: Jonathan Cameron

Date: Wed Jan 14 2026 - 13:33:29 EST


On Wed, 14 Jan 2026 11:28:31 -0700
Dave Jiang <dave.jiang@xxxxxxxxx> wrote:

> On 1/14/26 9:48 AM, Robert Richter wrote:
> > 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_NORM_ADDR 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.
> >
> > Reviewed-by: Alison Schofield <alison.schofield@xxxxxxxxx>
> > Signed-off-by: Robert Richter <rrichter@xxxxxxx>
>
> As you mentioned commit log needs updating, otherwise
> Reviewed-by: Dave Jiang <dave.jiang@xxxxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>

Just goes to show one should always refresh email even when half way through
reviewing a patch series :)

Jonathan