All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory Price <gregory.price@memverge.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-cxl@vger.kernel.org, vishal.l.verma@intel.com,
	ira.weiny@intel.com, dave.jiang@intel.com,
	alison.schofield@intel.com, Jonathan.Cameron@huawei.com
Subject: Re: [PATCH] cxl/port: Fix find_cxl_root() for RCDs and simplify it
Date: Wed, 29 Mar 2023 06:27:42 -0400	[thread overview]
Message-ID: <ZCQSnlEmhGXF5gnW@memverge.com> (raw)
In-Reply-To: <6424b0295461c_c72229470@dwillia2-mobl3.amr.corp.intel.com.notmuch>

On Wed, Mar 29, 2023 at 02:39:53PM -0700, Dan Williams wrote:
> Gregory Price wrote:
> > On Tue, Mar 28, 2023 at 11:36:17AM -0700, Dan Williams wrote:
> > > The find_cxl_root() helper is used to lookup root decoders and other CXL
> > > platform topology information for a given endpoint. It turns out that
> > > for RCDs it has never worked. The result of find_cxl_root(&cxlmd->dev)
> > > is always NULL for the RCH topology case because it expects to find a
> > > cxl_port at the host-bridge. RCH topologies only have the root cxl_port
> > > object with the host-bridge as a dport. While there are no reports of
> > > this being a problem to date, by inspection region enumeration should
> > > crash as a result of this problem, and it does in a local unit test for
> > > this scenario.
> > > 
> > > However, an observation that ever since:
> > > 
> > > commit f17b558d6663 ("cxl/pmem: Refactor nvdimm device registration, delete the workqueue")
> > > 
> > > ...all callers of find_cxl_root() occur after the memdev connection to
> > > the port topology has been established. That means that find_cxl_root()
> > > can be simplified to a walk of the endpoint port topology to the root.
> > > Switch to that arrangement which also fixes the RCD bug.
> > > 
> > > Fixes: a32320b71f08 ("cxl/region: Add region autodiscovery")
> > > Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> [..]
> > Is it expected that RCD's will fail when set to EFI_MEMORY_SP?  If
> > that's the case, then this (and the other patch) look safe and do not
> > produce regression.
> > 
> > Just want to capture this behavior, as it appears there may be other
> > issues related to RCH/RCD combinations.
> 
> After I posted this fix testing revealed the need for a few more fixes,
> now posted. Most importantly for accessing range register defined
> regions is this new fix:
> 
> http://lore.kernel.org/r/168012575521.221280.14177293493678527326.stgit@dwillia2-xfh.jf.intel.com

Are these patches on top of an unpushed cxl branch? I'm having a hard
time finding the base patch to apply these to.

Thanks for the help,
Gregory

  reply	other threads:[~2023-03-29 22:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28 18:36 [PATCH] cxl/port: Fix find_cxl_root() for RCDs and simplify it Dan Williams
2023-03-29  5:22 ` Gregory Price
2023-03-29 21:39   ` Dan Williams
2023-03-29 10:27     ` Gregory Price [this message]
2023-03-29 22:21       ` Dan Williams
2023-03-29 10:38         ` Gregory Price
2023-03-29 17:36 ` Dave Jiang
2023-03-30 17:35 ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZCQSnlEmhGXF5gnW@memverge.com \
    --to=gregory.price@memverge.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.