From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: Fan Ni <fan.ni@samsung.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Michael Tsirkin <mst@redhat.com>,
Ben Widawsky <bwidawsk@kernel.org>,
"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
"linuxarm@huawei.com" <linuxarm@huawei.com>,
Ira Weiny <ira.weiny@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
"alison.schofield@intel.com" <alison.schofield@intel.com>
Subject: Re: [PATCH 2/2] hw/pxb-cxl: Support passthrough HDM Decoders unless overridden
Date: Fri, 27 Jan 2023 17:15:53 +0000 [thread overview]
Message-ID: <20230127171553.00001bfb@Huawei.com> (raw)
In-Reply-To: <20230127170210.GA211474@bgt-140510-bm03>
On Fri, 27 Jan 2023 17:02:36 +0000
Fan Ni <fan.ni@samsung.com> wrote:
> On Fri, Jan 27, 2023 at 10:01:49AM +0000, Jonathan Cameron wrote:
>
> > On Thu, 26 Jan 2023 21:57:35 +0000
> > Fan Ni <fan.ni@samsung.com> wrote:
> >
> > > On Wed, Jan 25, 2023 at 03:27:03PM +0000, Jonathan Cameron wrote:
> > >
> > > > The CXL r3.0 specification allows for there to be no HDM decoders on CXL
> > > > Host Bridges if they have only a single root port. Instead, all accesses
> > > > directed to the host bridge (as specified in CXL Fixed Memory Windows)
> > > > are assumed to be routed to the single root port.
> > > >
> > > > Linux currently assumes this implementation choice. So to simplify testing,
> > > > make QEMU emulation also default to no HDM decoders under these particular
> > > > circumstances, but provide a hdm_for_passthrough boolean option to have
> > > > HDM decoders as previously.
> > > >
> > > > Technically this is breaking backwards compatibility, but given the only
> > > > known software stack used with the QEMU emulation is the Linux kernel
> > > > and this configuration did not work before this change, there are
> > > > unlikely to be any complaints that it now works. The option is retained
> > > > to allow testing of software that does allow for these HDM decoders to exist,
> > > > once someone writes it.
> > > >
> > > > Reported-by: Fan Ni <fan.ni@samsung.com>
> > > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > > > pxb_dev_realize_common(dev, CXL, errp);
> > > > - pxb_dev_reset(DEVICE(dev));
> > > > + pxb_cxl_dev_reset(DEVICE(dev));
> > > > }
> > > >
> > > > +static Property pxb_cxl_dev_properties[] = {
> > > > + /* Note: 0 is not a legal PXB bus number. */
> > > > + DEFINE_PROP_UINT8("bus_nr", PXBDev, bus_nr, 0),
> > > > + DEFINE_PROP_UINT16("numa_node", PXBDev, numa_node, NUMA_NODE_UNASSIGNED),
> > > > + DEFINE_PROP_BOOL("bypass_iommu", PXBDev, bypass_iommu, false),
> > > > + DEFINE_PROP_BOOL("hdm_for_passthrough", PXBDev, hdm_for_passthrough, false),
> > > when setting hdm_for_passthrough to true at the qemu command line, we
> > > will see the segfault issue as before. I think this is expected as it
> > > is the logic in cxl_cfmws_find_device. Wondering if there will be
> > > following fixes to handle the case when hdm_for_passthrough is true.
> >
> > Absolutely, I'd expect a kernel fix for that case, but it's probably not
> > high priority for anyone given we don't yet have any hardware that does that
> > (as far as I know anyway!)
> >
> > I wanted to keep the control here to make that easy to test when we do
> > have the fix in place.
> > Jonathan
> Make sense!
>
> Reviwed-by: Fan Ni <fan.ni@samsung.com>
> Tested-by: Fan Ni <fan.ni@samsung.com>
Thanks!
Typo in Reviewed-by If this version gets picked up hopefully Michael can
fix whilst applying. If I do a v2 for other feedback I'll fix it.
Jonathan
prev parent reply other threads:[~2023-01-27 17:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 15:27 [PATCH 0/2] hw/cxl: Passthrough HDM decoder emulation Jonathan Cameron via
2023-01-25 15:27 ` [PATCH 1/2] hw/pci: Add pcie_count_ds_port() and pcie_find_port_first() helpers Jonathan Cameron via
2023-01-25 15:27 ` [PATCH 2/2] hw/pxb-cxl: Support passthrough HDM Decoders unless overridden Jonathan Cameron via
[not found] ` <CGME20230126215736uscas1p2166334bf8185239cf6ac70053dc386c5@uscas1p2.samsung.com>
2023-01-26 21:57 ` Fan Ni
2023-01-27 10:01 ` Jonathan Cameron via
2023-01-27 17:02 ` Fan Ni
2023-01-27 17:15 ` Jonathan Cameron via [this message]
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=20230127171553.00001bfb@Huawei.com \
--to=qemu-devel@nongnu.org \
--cc=Jonathan.Cameron@Huawei.com \
--cc=alison.schofield@intel.com \
--cc=bwidawsk@kernel.org \
--cc=dave.jiang@intel.com \
--cc=fan.ni@samsung.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mst@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).