Re: [PATCH v2 09/15] cxl/region: Use the endpoint's SPA range to create a region

Gregory Price
2025-04-08T15:50:33Z

On Tue, Feb 18, 2025 at 02:23:50PM +0100, Robert Richter wrote:
> To create a region, SPA ranges must be used. With address translation
> the endpoint's HPA range is not the same as the SPA range. Use the
> previously calculated SPA range instead.
>

Same with patch 8, I think this probably should just be rolled in with
patch 5. You can simplify the notes in patch 5 by saying:

"""
since cxled->spa_range is set to cxled->cxld.hpa_range at endpoint
initialization, this patch is effectively a no-op for all systems
that do not provide a translation callback.

Change all refs to cxled->cxld.hpa_range to cxled->spa_range.
"""

This should also help simplify the patch series overall.

I haven't gone through to check if there are any other missed hpa_range
references yet (e.g. [1])

[1] https://lore.kernel.org/linux-cxl/20250218132356.1809075-1-rrichter@amd.com/T/#m26a8e4d8b1783dfb837553f184f7f174b61b7825

~Gregory