Re: [PATCH 1/1] cxl/region: Fix the first aliased address miscalculation

From: Ira Weiny
Date: Thu Mar 20 2025 - 14:27:37 EST


Li Ming wrote:
> In extended linear cache(ELC) case, cxl_port_get_spa_cache_alias() helps
> to get the aliased address of a SPA, it considers the first address in
> CXL memory range is "region start + region cache size + 1", but it
> should be "region start + region cache size".
>
> So if a SPA is equal to "region start + region cache size", its aliased
> address should be "SPA - region cache size".
>
> Signed-off-by: Li Ming <ming.li@xxxxxxxxxxxx>

Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>

[snip]