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] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6M_o38RAphRep_x@rric.localdomain>
Date: Wed, 5 Feb 2025 11:38:27 +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 16/29] cxl/region: Use translated HPA ranges to
 calculate the endpoint position

On 07.01.25 17:01:22, Gregory Price wrote:
> On Tue, Jan 07, 2025 at 03:10:02PM +0100, Robert Richter wrote:
> > To enable address translation, the calculation of the endpoint
> > position must use translated HPA ranges. The function
> > cxl_endpoint_initialize() already uses translation which could be
> > reused to calculate the endpoint position.
> > 
> > Use translated HPA address ranges for the calculation of endpoint
> > position by moving it to cxl_endpoint_initialize(). Create a function
> > cxl_port_calc_pos() for use in the iterator there, but keep a
> > simplified version of cxl_calc_interleave_pos() for the
> > non-auto-discovery code path without address translation since it is
> > not support there.
> > 
> > Signed-off-by: Robert Richter <rrichter@....com>
> > ---
> 
> just one inline question
> 
> > +static int cxl_calc_interleave_pos(struct cxl_endpoint_decoder *cxled)
> > +{
> > +	struct cxl_port *iter, *port = cxled_to_port(cxled);
> > +	struct cxl_memdev *cxlmd = cxled_to_memdev(cxled);
> > +	struct range *range = &cxled->cxld.hpa_range;
> > +	int pos = 0;
> > +
> > +	/*
> > +	 * Address translation is only supported for auto-discovery of
> > +	 * decoders. There is no need to support address translation
> > +	 * here.
> > +	 */
> 
> Just clarifying - it's only supported for discovery of already
> programmed decoders (programmed in BIOS)? i.e. driver-programmed
> decoders shouldn't need this translation / won't support this type of
> interleaving?

Right now only translation from endpoint to root is
supported/implemented, not the other direction root to endpoint. That
is, only address ranges of firmware programmed decoders can be
translated.

However, support could be added but that is not the focus of this
series. Current implementation can determine the endpoints base SPA,
so it might be feasible to add support of driver-programmed decoders
using only endpoint-to-root translation, but I haven't tried that yet.

Another use case is RAS to translate endpoint addresses to SPA.

-Robert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ