Re: [PATCH v24 10/11] cxl: Avoid dax creation for accelerators

Alison Schofield
2026-03-25T02:59:59Z

On Mon, Mar 23, 2026 at 11:31:16AM +0000, alejandro.lucero-palau@amd.com wrote:
> From: Alejandro Lucero <alucerop@amd.com>
>
> By definition a type2 cxl device will use the host managed memory for
> specific functionality, therefore it should not be available to other
> uses.

Hi Alejandro,

I'm wondering if we're skipping too much, or perhaps just needs
a clarifying comment?

Commit message says 'Avoid dax creation...', that's specific.

Commit log says 'should not be available to other uses', that's less specific

follow me ...

>
> Signed-off-by: Alejandro Lucero <alucerop@amd.com>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Reviewed-by: Davidlohr Bueso <daves@stgolabs.net>
> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> Reviewed-by: Ben Cheatham <benjamin.cheatham@amd.com>
> ---
> drivers/cxl/core/region.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> index 8bb53a095290..2f9bdb4f1f4f 100644
> --- a/drivers/cxl/core/region.c
> +++ b/drivers/cxl/core/region.c
> @@ -4263,6 +4263,13 @@ static int cxl_region_probe(struct device *dev)
> if (rc)
> return rc;
>
> + /*
> + * HDM-D[B] (device-memory) regions have accelerator specific usage.
> + * Skip device-dax registration.
> + */
> + if (cxlr->type == CXL_DECODER_DEVMEM)
> + return 0;
> +

And above says 'Skip device-dax' specific again, and is indeed skipped.

This escape is not surgically placed at the point where dax is added.
We are skipping a few other things before dax registration actually
happens. Why skip memory notifiers, shutdown_notifiers, poison setup?

> /*
> * From this point on any path that changes the region's state away from
> * CXL_CONFIG_COMMIT is also responsible for releasing the driver.
> --
> 2.34.1
>
>