Re: [PATCH v4 08/14] cxl: Introduce callback for HPA address ranges translation
From: Jonathan Cameron
Date: Tue Nov 11 2025 - 10:15:09 EST
On Mon, 3 Nov 2025 19:47:49 +0100
Robert Richter <rrichter@xxxxxxx> wrote:
> Introduce a callback to translate an endpoint's HPA range to the
> address range of the root port which is the System Physical Address
> (SPA) range used by a region. The callback can be set if a platform
> needs to handle address translation.
>
> The callback is attached to the root port. An endpoint's root port can
> easily be determined in the PCI hierarchy without any CXL specific
> knowledge. This allows the early use of address translation for CXL
> enumeration. Address translation is esp. needed for the detection of
> the root decoders. Thus, the callback is embedded in struct
> cxl_root_ops instead of struct cxl_rd_ops.
>
> Signed-off-by: Robert Richter <rrichter@xxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>