From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: <ira.weiny@intel.com>, <alucerop@amd.com>,
<a.manzanares@samsung.com>, <linux-cxl@vger.kernel.org>,
<qemu-devel@nongnu.org>
Subject: Re: [PATCH RFC -qemu 0/2] hw/cxl: Support Back Invalidation
Date: Thu, 31 Jul 2025 15:20:39 +0100 [thread overview]
Message-ID: <20250731152039.00005fa2@huawei.com> (raw)
In-Reply-To: <20250729165441.1898150-1-dave@stgolabs.net>
On Tue, 29 Jul 2025 09:54:39 -0700
Davidlohr Bueso <dave@stgolabs.net> wrote:
> Hello,
>
> The following allows support for component basic back invalidation discovery
> and config, by exposing the BI routing table and decoder registers. Instead
> of going the type2[1] route, this series proposes adding support for type3
> hdm-db, which allows a more direct way of supporting BI in qemu.
>
> Caveats/RFC: Just as in Ira's series, there is the question about the whole topology
> allowing BI, not just the endpoint device. That series left the rest of topology
> (dsp, rp) non-BI capable, for which any kernel counterpart testing would fail
> when using type2, but at the same time is also consistent with flit 68B when not
> using a type2 device.
>
> This series blindly enables BI capabilities for ports even when no type3 hdm-db
> is being used. While it is handy, it is inconsistent with the driver seeing 68B
> and the BI registers in such cases. I've been going back and forth with possible
> workarounds, but don't really have a good answer, and this will ultimately
> affect not only BI but all goodies that come with 256B flit. Any suggestions welcome.
Hi Davidlohr,
We probably need to make this work like link width. That would push the control
to the downstream port side and effectively 'trains' the link (really simple negotiation
of capabilities). I don't think we care about more capable device plugged into
a less capable upstream port, so a simple property for the type 3 device (and switch USP)
should do the job. If we want to do the optimized flits we'll need a little more.
So in short, make RP and downstream port always BI and 256bit flit capable, but
'fake' the training so if they are plugged into a EP or switch USP they report
whatever that was configured for.
So alongside your hdm-db property in patch 2, have a 256bit-flit property.
Both of those have to apply for type 3 and the switch USP.
Then we sanity check the combination works (i.e. hdm-db only if 256 bit flit)
I think we need this fine grained control because we want to poke the corners
where only parts of the tree are BI capable.
So, precursor patch to enable 256bit flit mode then this stuff on top.
Jonathan
>
> Patch 1: is lifted from Ira's series with some small (but non-trivial) changes.
> Patch 2: adds BI decoder/rt register support.
>
> Testing wise, this has passed relevant kernel side BI register IO flows and
> setup.
>
> Applies against branch 'origin/cxl-2025-07-03' from the jic23 repository.
>
> Thanks!
>
> [1] https://lore.kernel.org/linux-cxl/20230517-rfc-type2-dev-v1-0-6eb2e470981b@intel.com/
>
> Davidlohr Bueso (1):
> hw/cxl: Support Type3 HDM-DB
>
> Ira Weiny (1):
> hw/cxl: Refactor component register initialization
>
> hw/cxl/cxl-component-utils.c | 206 ++++++++++++++++++++++++---------
> hw/mem/cxl_type3.c | 5 +-
> include/hw/cxl/cxl_component.h | 87 +++++++++++---
> include/hw/cxl/cxl_device.h | 3 +
> 4 files changed, 232 insertions(+), 69 deletions(-)
>
> --
> 2.39.5
>
prev parent reply other threads:[~2025-07-31 15:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-29 16:54 [PATCH RFC -qemu 0/2] hw/cxl: Support Back Invalidation Davidlohr Bueso
2025-07-29 16:54 ` [PATCH 1/2] hw/cxl: Refactor component register initialization Davidlohr Bueso
2025-07-29 16:54 ` [PATCH 2/2] hw/cxl: Support Type3 HDM-DB Davidlohr Bueso
2025-07-31 14:20 ` 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=20250731152039.00005fa2@huawei.com \
--to=qemu-devel@nongnu.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=a.manzanares@samsung.com \
--cc=alucerop@amd.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
/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).