Re: [PATCH v4 2/2] tools/testing/cxl: Enable zero sized decoder under hb0
From: Alison Schofield
Date: Fri Jun 12 2026 - 14:16:24 EST
On Sun, Jun 07, 2026 at 04:13:45PM +0800, Richard Cheng wrote:
> The kernel now allows committed HDM decoders of zero size so BIOS can
> burn slots with LOCK; 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. commit_end then lands on a
> decoder with no DPA resource, exercising the new enumeration and
> poison-by-endpoint paths.
>
> Gating keeps the default topology, shared by the rest of the cxl suite,
> unchanged.
Can you add a unit test case for this? I think it makes sense in
cxl-topology.sh. Perhaps before or after the work on the default
cxl-test topology, load this new topo up and validate the zero size
decoders are as expected.