[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6S3vciadA47epKN@rric.localdomain>
Date: Thu, 6 Feb 2025 14:23:09 +0100
From: Robert Richter <rrichter@....com>
To: Gregory Price <gourry@...rry.net>
Cc: Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Ira Weiny <ira.weiny@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
Dave Jiang <dave.jiang@...el.com>,
Davidlohr Bueso <dave@...olabs.net>, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Fabio M. De Francesco" <fabio.m.de.francesco@...ux.intel.com>,
Terry Bowman <terry.bowman@....com>
Subject: Re: [PATCH v1 21/29] cxl/region: Lock decoders that need address
translation
On 07.01.25 17:35:00, Gregory Price wrote:
> On Tue, Jan 07, 2025 at 03:10:07PM +0100, Robert Richter wrote:
> > There is only support to translate from the endpoint to its parent
> > port, but not in the opposite direction from the parent to the
> > endpoint. Thus, the endpoint address range cannot be determined and
> > setup manually. If the parent implements the ->to_hpa() callback and
> > needs address translation, forbit reprogramming of the decoders and
> ^^^^^^
> forbid?
>
> > lock them.
> >
> > Signed-off-by: Robert Richter <rrichter@....com>
> > ---
> > drivers/cxl/core/region.c | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> > index 8d7893878362..681c26abc26e 100644
> > --- a/drivers/cxl/core/region.c
> > +++ b/drivers/cxl/core/region.c
> > @@ -3353,6 +3353,17 @@ static int cxl_endpoint_initialize(struct cxl_endpoint_decoder *cxled)
> > if (cxl_port_calc_hpa(parent, cxld, &hpa))
> > return -ENXIO;
> >
> > + /*
> > + * There is only support to translate from the endpoint to its
> > + * parent port, but not in the opposite direction from the
> > + * parent to the endpoint. Thus, the endpoint address range
> > + * cannot be determined and setup manually. If the parent
> > + * implements the ->to_hpa() callback and needs address
> > + * translation, forbit reprogramming of the decoders and lock
> ^^^^^^
> forbid?
Updated both.
-Robert
>
> > + * them.
> > + */
> > + cxld->flags |= CXL_DECODER_F_LOCK;
> > +
> > /* Iterate from endpoint to root_port refining the position */
> > pos = cxl_port_calc_pos(iter, &hpa, pos);
> > if (pos < 0)
> > --
> > 2.39.5
> >
Powered by blists - more mailing lists