lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6c280b81-3d6e-484d-92e2-9758a4fcb747@amd.com>
Date: Thu, 6 Feb 2025 17:58:06 +0000
From: Alejandro Lucero Palau <alucerop@....com>
To: Ira Weiny <ira.weiny@...el.com>, linux-cxl@...r.kernel.org,
 netdev@...r.kernel.org, dan.j.williams@...el.com, edward.cree@....com,
 davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
 edumazet@...gle.com, dave.jiang@...el.com
Subject: Re: [PATCH v10 07/26] cxl: add support for setting media ready by an
 accel driver


On 2/5/25 21:42, Ira Weiny wrote:
> alucerop@ wrote:
>> From: Alejandro Lucero <alucerop@....com>
> [snip]
>
>> diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c
>> index 08705c39721d..4461cababf6a 100644
>> --- a/drivers/cxl/core/pci.c
>> +++ b/drivers/cxl/core/pci.c
>> @@ -177,8 +177,9 @@ static int cxl_dvsec_mem_range_active(struct cxl_dev_state *cxlds, int id)
>>    * Wait up to @media_ready_timeout for the device to report memory
>>    * active.
>>    */
>> -int cxl_await_media_ready(struct cxl_dev_state *cxlds)
>> +int cxl_await_media_ready(struct cxl_memdev_state *cxlmds)
>>   {
>> +	struct cxl_dev_state *cxlds = &cxlmds->cxlds;
> I feel like I have missed something where suddenly cxl_memdev_state is the
> primary carrier of the CXL state for accelerators.  Here, like in a
> previous patch, you simply turn mds into cxlds?


Yes. It is explained in the cover letter. I'm not allocating a 
cxl_dev_state anymore but a cxl_memdev_state which contains the other one.

I did use original code from Dan and I did feel the structs required a 
new refactoring with the arrival of Type2 support. But I know have a 
better understanding of the code and structs, and there is no reason for 
allocating cxl_dev_state only for a Type2, since it is a memdev as well. 
It makes things simpler and cleaner.


So the reference struct for all the accel API is now the 
cxl_memdev_state instead of cxl_dev_state. For allowing sharing of 
current code with Type2 needs, some functions are modified for receiving 
a cxl_memdev_state now, what I do not think it being problematic at all.

I know this is a main change for a v10, but the DPA changes and some 
comments from Dan pushed me for this, what I had in my mind for a while.

I hope it makes sense ...


>>   	struct pci_dev *pdev = to_pci_dev(cxlds->dev);
>>   	int d = cxlds->cxl_dvsec;
>>   	int rc, i, hdm_count;
>> @@ -211,6 +212,14 @@ int cxl_await_media_ready(struct cxl_dev_state *cxlds)
>>   }
>>   EXPORT_SYMBOL_NS_GPL(cxl_await_media_ready, "CXL");
>>   
>> +void cxl_set_media_ready(struct cxl_memdev_state *cxlmds)
>> +{
>> +	struct cxl_dev_state *cxlds = &cxlmds->cxlds;
> And here same thing here?
>
> Ira
>
> [snip]
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ