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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250623102047.000020fc@huawei.com>
Date: Mon, 23 Jun 2025 10:20:47 +0100
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Neeraj Kumar <s.neeraj@...sung.com>
CC: <dan.j.williams@...el.com>, <dave@...olabs.net>, <dave.jiang@...el.com>,
	<alison.schofield@...el.com>, <vishal.l.verma@...el.com>,
	<ira.weiny@...el.com>, <a.manzanares@...sung.com>, <nifan.cxl@...il.com>,
	<anisa.su@...sung.com>, <vishak.g@...sung.com>, <krish.reddy@...sung.com>,
	<arun.george@...sung.com>, <alok.rathore@...sung.com>,
	<neeraj.kernel@...il.com>, <linux-kernel@...r.kernel.org>,
	<linux-cxl@...r.kernel.org>, <nvdimm@...ts.linux.dev>,
	<gost.dev@...sung.com>, <cpgs@...sung.com>
Subject: Re: [RFC PATCH 13/20] cxl/mem: Refactor cxl pmem region
 auto-assembling

On Tue, 17 Jun 2025 18:09:37 +0530
Neeraj Kumar <s.neeraj@...sung.com> wrote:

> In 84ec985944ef3, For cxl pmem region auto-assembly after endpoint port
> probing, cxl_nvd presence was required. And for cxl region persistency,
> region creation happens during nvdimm_probe which need the completion
> of endpoint probe.
> 
> It is therefore refactored cxl pmem region auto-assembly after endpoint
> probing to cxl mem probing
> 
> Signed-off-by: Neeraj Kumar <s.neeraj@...sung.com>
For ordering requirements this needs more eyes.  I've never cared that
much about he persistency and auto assembly code so not something I have
a good mental model of!


> ---
>  drivers/cxl/core/port.c | 38 ++++++++++++++++++++++++++++++++++++++
>  drivers/cxl/cxl.h       |  1 +
>  drivers/cxl/mem.c       | 27 ++++++++++++++++++---------
>  drivers/cxl/port.c      | 38 --------------------------------------
>  4 files changed, 57 insertions(+), 47 deletions(-)

> diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c
> index 2f03a4d5606e..aaea4eb178ef 100644
> --- a/drivers/cxl/mem.c
> +++ b/drivers/cxl/mem.c

> @@ -180,6 +171,24 @@ static int cxl_mem_probe(struct device *dev)
>  			return rc;
>  	}
>  
> +	if (resource_size(&cxlds->pmem_res) && IS_ENABLED(CONFIG_CXL_PMEM)) {
> +		rc = devm_cxl_add_nvdimm(parent_port, cxlmd);
> +		if (rc) {
> +			if (rc == -ENODEV)
> +				dev_info(dev, "PMEM disabled by platform\n");
> +			return rc;
> +		}
> +	}
> +
> +	/*
> +	 * Now that all endpoint decoders are successfully enumerated, try to
> +	 * assemble region autodiscovery from committed decoders.
> +	 * Earlier it was part of cxl_endpoint_port_probe, So moved it here

I would drop this history statement. Good to have in the patch description
but no point in keeping it in the code. Just state what the requirements
are now.

> +	 * as cxl_nvd of the memdev needs to be available during the pmem
> +	 * region auto-assembling
> +	 */
> +	cxl_region_discovery(cxlmd->endpoint);
> +
>  	/*
>  	 * The kernel may be operating out of CXL memory on this device,




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ