Re: [PATCH v4 1/4] cxl/hdm: Reject switch decoder interleave ways that overflow targets

Davidlohr Bueso <[email protected]> Wed, 29 Jul 2026 09:45:14 -0700
Newsgroups org.kernel.vger.linux-cxl
Message-ID <20260729164514.esgrps5ajkydfqhz@offworld>
On Mon, 20 Jul 2026, Alison Schofield wrote:

>Switch decoder enumeration validates that the interleave ways encoding
>is legal, but not that the resulting number of ways fits the available
>targets. This can overrun the target arrays during enumeration.
>
>Reject committed decoders whose interleave ways exceed either the
>hardware target list capacity or the reported target count. Reject
>switch decoders that report zero targets.
>
>For uncommitted decoders, ignore the stale interleave ways value and
>reset it to one until the decoder is committed.
>
>Add a clarifying comment that target_count is a direct count, not
>0-based like decoder_count.

Tested-by: Davidlohr Bueso <[email protected]>
Reviewed-by: Davidlohr Bueso <[email protected]>