Re: [PATCH v7 2/2 RESEND] tools/testing/cxl: Enable zero sized decoders under hb0
From: Alison Schofield
Date: Thu Jul 30 2026 - 20:19:48 EST
On Tue, Jul 21, 2026 at 04:57:15PM +0800, Richard Cheng wrote:
> The kernel now allows committed zero-size HDM decoders so BIOS can lock
> empty decoders; cxl_test needs to exercise that path.
>
> Add a mock_zero_size_decoders module parameter (default off). When set,
> the special endpoints under host-bridge0 (cxl_mem.0 and cxl_mem.4)
> commit decoders 1 and 2 as zero-size + locked above the decoder[0]
> auto-region, mirrored on the parent switch and host bridge. The mocks
> take a real zero-size DPA reservation, like enumeration of real
> hardware, so commit_end lands on a zero-size decoder and the
> reservation, poison-by-endpoint, and teardown paths all run.
>
> Signed-off-by: Vishal Aslot <vaslot@xxxxxxxxxx>
> Signed-off-by: Richard Cheng <icheng@xxxxxxxxxx>
Reviewed-by: Alison Schofield <alison.schofield@xxxxxxxxx>