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: <Z6ST4HoCHAFo9WXt@rric.localdomain>
Date: Thu, 6 Feb 2025 11:50:08 +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 19/29] cxl/region: Use endpoint's HPA range to find
 the port's decoder

On 07.01.25 17:18:49, Gregory Price wrote:
> On Tue, Jan 07, 2025 at 03:10:05PM +0100, Robert Richter wrote:
> > For the implementation of address translation it might not be possible
> > to determine the root decoder in the early enumeration state since the
> > SPA range is still unknown. Instead, the endpoint's HPA range is known
> > and from there the topology can be traversed up to the root port while
> > the memory range is adjusted from one memory domain to the next up to
> > the root port.
> > 
> > In a first step, use endpoint's HPA range to find the port's decoder.
> > Without address translation there is HPA == SPA. Then, the HPA range
> > of the endpoint can be used instead of the root decoder's range as
> > both are the same.
> > 
> > Signed-off-by: Robert Richter <rrichter@....com>
> 
> I'll make a note to test up to this patch in particular in HPA==SPA
> mode without the follow ons.
> 
> The functional change here is the move from cxlr->params to
> cxled->cxld.hpa_range. 
> 
> What was the likely value of cxlr->params previously? Undefined?

The region's hpa range was set up with the same values. Thus it can be
used interchangeable.

Call chain:

cxl_endpoint_decoder_add
  hpa = &cxled->cxld.hpa_range;
  cxl_find_region_by_range(..., hpa);
    match_region_by_range(..., hpa);
  construct_region
    hpa = &cxled->cxld.hpa_range;
    *res = DEFINE_RES_MEM_NAMED(hpa->start, range_len(hpa), ...)
  attach_target
    cxl_region_attach
      cxl_region_attach_position
        cxl_port_attach_region
          cxl_find_decoder_early
            hpa = &cxled->cxld.hpa_range
            match_auto_decoder(..., hpa)

Note I have moved out the switch to spa_range of "[PATCH v1 15/29]
cxl/region: Use an endpoint's SPA range to find a region" to a later
patch for a better understanding of the changes, but technically it is
the same as there is still spa == hpa at this point.

> 
> Otherwise I don't immediately see any issues.
> 
> Reviewed-by: Gregory Price <gourry@...rry.net>

Thanks,

-Robert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ