From: Dan Williams <dan.j.williams@intel.com>
To: Terry Bowman <Terry.Bowman@amd.com>,
Dan Williams <dan.j.williams@intel.com>,
<alison.schofield@intel.com>, <vishal.l.verma@intel.com>,
<dave.jiang@intel.com>, <ira.weiny@intel.com>,
<bwidawsk@kernel.org>
Cc: <linux-cxl@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<bhelgaas@google.com>, <rafael@kernel.org>, <lenb@kernel.org>,
<Jonathan.Cameron@huawei.com>, <dave@stgolabs.net>,
<rrichter@amd.com>
Subject: Re: [PATCH 2/5] cxl/pci: Discover and cache pointer to RCD dport's PCIe AER capability
Date: Tue, 25 Oct 2022 11:21:43 -0700 [thread overview]
Message-ID: <6358293722b51_4da329420@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <a65a2259-9835-bb12-5856-8e695b194191@amd.com>
Terry Bowman wrote:
[..]
> > diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
> > index f680450f0b16..b42f4759743b 100644
> > --- a/drivers/cxl/cxl.h
> > +++ b/drivers/cxl/cxl.h
> > @@ -499,12 +499,19 @@ cxl_find_dport_by_dev(struct cxl_port *port, const struct device *dport_dev)
> > * @port_id: unique hardware identifier for dport in decoder target list
> > * @component_reg_phys: downstream port component registers
> > * @port: reference to cxl_port that contains this downstream port
> > + * @is_rch: enable RCH vs VH enumeration (see CXL 3.0 9.11.8)
> > */
> > struct cxl_dport {
> > struct device *dport;
> > int port_id;
> > resource_size_t component_reg_phys;
> > struct cxl_port *port;
> > + bool is_rch;
> > +};
> > +
> > +struct cxl_rch_dport {
> > + struct cxl_dport dport;
> > + resource_size_t rcrb_phys;
> > };
> >
>
> The same is needed for uport as well, correct ?
Hmm, I don't think there are any 'struct cxl_port' instances that need
an RCH flag in the Linux CXL topology model. That was the feedback /
realization that Dave and I came to while reviewing Robert's RCH series.
In the RCH case the ACPI0016 host-bridge houses a
root-complex-integrated endpoint that is a peer of the
downstream-PCI-root-ports in the bridge. The topology ends up looking
like this:
# cxl list -BEMPTu
{
"bus":"root0",
"provider":"ACPI.CXL",
"nr_dports":1,
"dports":[
{
"dport":"pci0000:38",
"id":"0x31"
}
],
"endpoints:root0":[
{
"endpoint":"endpoint1",
"host":"mem0",
"depth":1,
"memdev":{
"memdev":"mem0",
"pmem_size":0,
"ram_size":"16.00 GiB (17.18 GB)",
"serial":"0",
"numa_node":0,
"host":"0000:38:00.0"
}
}
]
}
Notice that the logical ACPI0017 (CXL root) device lists the ACPI0016
device (associated with pci0000:38) as a 'struct cxl_dport'. The
endpoint is then connected to that dport. There are no intervening
'struct cxl_port' instances between the root0 and endpoint1 like there
would be in the CXL VH case.
Now, the problem is that there is no viable object that can drive access
to the upstream port component registers. It may be the case that when
the cxl_port driver attaches to an endpoint port that the endpoint port
driver maps both the upstream and downstream hardware-port registers for
the purposes of conveying RAS information.
> > /**
> >
> > Then, when cxl_mem notices that the memdev is being produced by an
> > RCIEP, it can skip devm_cxl_enumerate_ports() and jump straight to
> > cxl_mem_find_port(). That will return this dport with the rcrb base
> > where cxl_mem can arrange the AER handling. Likely we will need some
> > notification mechanism to route Root Complex AER events to cxl_acpi,
> > cxl_pci, and/or cxl_mem to optionally add the CXL RAS data to the log.
> >
> Isn't the notification mechanism through the AER interrupt processing?
> I will have more related comments in patch 3/5.
In this case I was talking about notifying the cxl_mem driver and/or the
cxl_port driver that it needs to decorate an AER event with more
object-local information.
next prev parent reply other threads:[~2022-10-25 18:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 18:56 [PATCH 0/5] cxl: Log downport PCIe AER and CXL RAS error information Terry Bowman
2022-10-21 18:56 ` [PATCH 1/5] cxl/acpi: Set ACPI's CXL _OSC to indicate CXL1.1 support Terry Bowman
2022-10-21 22:39 ` Dan Williams
2022-10-25 16:23 ` Terry Bowman
2022-10-21 18:56 ` [PATCH 2/5] cxl/pci: Discover and cache pointer to RCD dport's PCIe AER capability Terry Bowman
2022-10-22 21:45 ` Dan Williams
2022-10-25 16:42 ` Terry Bowman
2022-10-25 18:21 ` Dan Williams [this message]
2022-10-27 14:52 ` Bjorn Helgaas
2022-10-28 14:38 ` Terry Bowman
2022-10-21 18:56 ` [PATCH 3/5] cxl/pci: Discover and cache pointer to RCD dport's CXL RAS registers Terry Bowman
2022-10-22 22:44 ` Dan Williams
2022-10-26 19:01 ` Terry Bowman
2022-10-27 20:32 ` Dan Williams
2022-10-31 16:17 ` Terry Bowman
2022-10-28 12:53 ` Ariel.Sibley
2022-10-28 14:46 ` Terry Bowman
2022-10-21 18:56 ` [PATCH 4/5] cxl/pci: Enable RCD dport AER reporting Terry Bowman
2022-10-21 18:56 ` [PATCH 5/5] cxl/pci: Log CXL device's PCIe AER and CXL RAS error information Terry Bowman
2022-10-24 15:14 ` Jonathan Cameron
2022-10-27 21:30 ` Bjorn Helgaas
2022-10-21 19:02 ` [PATCH 0/5] cxl: Log downport " Terry Bowman
2022-10-28 12:30 ` Ariel.Sibley
2022-10-28 14:29 ` Terry Bowman
2022-10-28 16:37 ` Ariel.Sibley
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=6358293722b51_4da329420@dwillia2-xfh.jf.intel.com.notmuch \
--to=dan.j.williams@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=Terry.Bowman@amd.com \
--cc=alison.schofield@intel.com \
--cc=bhelgaas@google.com \
--cc=bwidawsk@kernel.org \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=lenb@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rrichter@amd.com \
--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.