Re: [RFC PATCH 01/13] cxl: Move mailbox related bits to the same context

Alejandro Lucero Palau
2024-07-19T16:07:28Z

On 7/19/24 16:47, Dave Jiang wrote:
> On 7/18/24 11:31 PM, Alejandro Lucero Palau wrote:
>> On 7/18/24 22:32, Dave Jiang wrote:
> <snip>
>
>>>   /*
>>>    * Per CXL 3.0 Section 8.2.8.4.5.1
>>>    */
>>> @@ -438,6 +403,7 @@ struct cxl_dev_state {
>>>       struct resource ram_res;
>>>       u64 serial;
>>>       enum cxl_devtype type;
>>> +    struct cxl_mailbox cxl_mbox;
>>>   };
>>>
>>
>> Being a mailbox an optional capability for Type2, not sure it should be here. Maybe it should but as a pointer for dynamically creating the struct if needed.
>>
>>
> Yes.... Which actually also ties in with your Type2 work. I talked to Dan last night while looking at your patch where the a software cap mask gets passed in for mailbox and HDM enumeration. The conclusion was that we need to refactor the code to deal with the optional component enumeration. For mailbox, it needs to be independent of memdev device state and the enumeration needs to be split out. I'm going to try to take a crack at it, unless you want to do it. :)
>

That sounds good. I think your work with current mailbox needs gives you
a better position than mine, but happy to help/discuss/review. An happy
to know my concerns about current core struct not unfounded.