Subject: Re: [PATCH v7 24/28] cxl: add region flag for precluding a device memory to be used for dax

From: Simon Horman <[email-masked]>
Date: Fri, 13 Dec 2024 10:23:17 +0000

On Fri, Dec 13, 2024 at 09:47:42AM +0000, Alejandro Lucero Palau wrote:
> 
> On 12/12/24 18:44, Simon Horman wrote:
> > On Mon, Dec 09, 2024 at 06:54:25PM +0000, [email-masked] wrote:
> > > From: Alejandro Lucero <[email-masked]>
> > > 
> > > By definition a type2 cxl device will use the host managed memory for
> > > specific functionality, therefore it should not be available to other
> > > uses. However, a dax interface could be just good enough in some cases.
> > > 
> > > Add a flag to a cxl region for specifically state to not create a dax
> > > device. Allow a Type2 driver to set that flag at region creation time.
> > > 
> > > Signed-off-by: Alejandro Lucero <[email-masked]>
> > > Reviewed-by: Zhi Wang <[email-masked]>
> > > ---
> > >   drivers/cxl/core/region.c | 10 +++++++++-
> > >   drivers/cxl/cxl.h         |  3 +++
> > >   drivers/cxl/cxlmem.h      |  3 ++-
> > >   include/cxl/cxl.h         |  3 ++-
> > >   4 files changed, 16 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> > > index b014f2fab789..b39086356d74 100644
> > > --- a/drivers/cxl/core/region.c
> > > +++ b/drivers/cxl/core/region.c
> > > @@ -3562,7 +3562,8 @@ __construct_new_region(struct cxl_root_decoder *cxlrd,
> > >    * cxl_region driver.
> > >    */
> > >   struct cxl_region *cxl_create_region(struct cxl_root_decoder *cxlrd,
> > > -				     struct cxl_endpoint_decoder *cxled)
> > > +				     struct cxl_endpoint_decoder *cxled,
> > > +				     bool no_dax)
> > nit: no_dax should be added to the Kernel doc for this function.
> 
> 
> Yes, I'll do.
> 
> 
> > 
> > Also, I think you need to squash the following patch, which updates
> > the caller to use pass the extra argument, into this patch. Or otherwise
> > rework things slightly to avoid breaking bisection.
> 
> 
> Correct. Ed raised this concern as well, and I'll change the patches order
> in v8 for avoiding the problem.

Thanks, and sorry for missing that Ed had already raised this.

Likewise, thanks for responding to my other feedback on this patchset.