Re: [PATCH v2] cxl/hdm: allow zero sized committed decoders
From: Vishal Aslot
Date: Sat Oct 04 2025 - 09:35:03 EST
> ________________________________________
> From: Davidlohr Bueso <dave@xxxxxxxxxxxx>
> Sent: Friday, October 3, 2025 7:06 PM
> To: Vishal Aslot
> Cc: Dave Jiang; Jonathan Cameron; Alison Schofield; Vishal Verma; Ira Weiny; Dan Williams; Li Ming; Peter Zijlstra; Dan Carpenter; Zijun Hu; linux-cxl@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2] cxl/hdm: allow zero sized committed decoders
>
> External email: Use caution opening links or attachments
>
>
> On Fri, 03 Oct 2025, Vishal Aslot wrote:
>
>>init_hdm_decoder() fails with -ENXIO if a
>>committed HDM decoder has zero size.
>
> This can be removed.
Thank you, Davidlohr, for the review. Much appreciated!
I will remove it in v3.
>
>>
>>The CXL spec permits committing zero sized decoders.
>
> This is enough info, no need for the quote below.
> And then add "Linux currently considers them an error".
Yep, will fix it in v3.
>
>> See "8.2.4.20.12 Committing Decoder Programming".
>> It says,"It is legal for software to program Decoder
>> Size to 0 and commit it. Such a decoder will not
>> participate in HDM decode."
>>
>> This patch updates init_hdm_decoder() to return
>> -ENOSPC if the decoder is commited with zero-size.
>
> This is not needed in the changelog. Instead the reader
> could be enlightened for potential reasons and use
> cases of 0 sized decoders.
Understood. Will update in v3.
>
>>The caller leaves the decoder allocated but does not
>>add it. It simply continues to the next decoder.
>
> Thanks,
> Davidlohr