Re: [PATCH v2 3/5] cxl/acpi: Add platform flag for HPA address translation
From: Dan Williams
Date: Thu Jul 11 2024 - 21:27:49 EST
Robert Richter wrote:
> Adding an early check to detect platform specifics to (later) enable
> HPA address translation. The cxl_root structure is used to store that
> information.
>
> Note: The platform check will be added later when enabling address
> translation.
It feels odd to have a flag at the root for this because the translation
is at the host-bridge level, right?
I was more thinking of a solution that does:
spa = cxld_hpa_to_spa(cxld);
...and then internal to that the code walks the port hierarchy from it's
host port to the host bridge. Then does something like
hb->hpa_to_spa(hb, hpa)
Where @hb is:
struct cxl_hb {
struct cxl_port port;
u64 (*hpa_to_spa)(struct cxl_hb *, u64);
}