Re: [PATCH v7 2/2 RESEND] tools/testing/cxl: Enable zero sized decoders under hb0

Alison Schofield <[email protected]> Thu, 30 Jul 2026 17:18:34 -0700
Newsgroups org.kernel.vger.linux-cxl,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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 <[email protected]>
> Signed-off-by: Richard Cheng <[email protected]>

Reviewed-by: Alison Schofield <[email protected]>