All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	 Davidlohr Bueso <dave@stgolabs.net>,
	 ira.weiny@intel.com,  alucerop@amd.com,
	a.manzanares@samsung.com,  linux-cxl@vger.kernel.org,
	qemu-devel@nongnu.org,
	 Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Subject: Re: [PATCH 1/4] hw/pcie: Support enabling flit mode
Date: Tue, 09 Sep 2025 16:47:48 +0200	[thread overview]
Message-ID: <87qzwfvg17.fsf@pond.sub.org> (raw)
In-Reply-To: <20250811125552-mutt-send-email-mst@kernel.org> (Michael S. Tsirkin's message of "Mon, 11 Aug 2025 12:57:01 -0400")

"Michael S. Tsirkin" <mst@redhat.com> writes:

> On Mon, Aug 11, 2025 at 04:57:41PM +0100, Jonathan Cameron wrote:
>> On Sun, 10 Aug 2025 20:34:02 -0700
>> Davidlohr Bueso <dave@stgolabs.net> wrote:
>> 
>> > As with the link speed and width training, have ad-hoc property for
>> > setting the flit mode and allow CXL components to make use of it.

I understand this is property "256b-flit".

> I note we didn't make it a stable API for width, want to
> prefix this one with "x-", too?

The only use of "256b-flit" is in docs/system/devices/cxl.rst [PATCH
4/4]:

    diff --git a/docs/system/devices/cxl.rst b/docs/system/devices/cxl.rst
    index bf7908429af8..4815de0f2dc4 100644
    --- a/docs/system/devices/cxl.rst
    +++ b/docs/system/devices/cxl.rst
    @@ -384,6 +384,29 @@ An example of 4 devices below a switch suitable for 1, 2 or 4 way interleave::
       -device cxl-type3,bus=swport3,persistent-memdev=cxl-mem3,lsa=cxl-lsa3,id=cxl-pmem3,sn=0x4 \
       -M cxl-fmw.0.targets.0=cxl.1,cxl-fmw.0.size=4G,cxl-fmw.0.interleave-granularity=4k

    +An example of 4 type3 devices with volatile memory below a switch. Two of the devices
    +use HDM-DB for coherence::
    +
    +  qemu-system-x86_64 -M q35,cxl=on -m 4G,maxmem=8G,slots=8 -smp 4 \
    +  ...
    +  -object memory-backend-file,id=cxl-mem0,share=on,mem-path=/tmp/cxltest.raw,size=256M \
    +  -object memory-backend-file,id=cxl-mem1,share=on,mem-path=/tmp/cxltest1.raw,size=256M \
    +  -object memory-backend-file,id=cxl-mem2,share=on,mem-path=/tmp/cxltest2.raw,size=256M \
    +  -object memory-backend-file,id=cxl-mem3,share=on,mem-path=/tmp/cxltest3.raw,size=256M \
    +  -device pxb-cxl,bus_nr=12,bus=pcie.0,id=cxl.1 \
    +  -device cxl-rp,port=0,bus=cxl.1,id=root_port0,chassis=0,slot=0 \
    +  -device cxl-rp,port=1,bus=cxl.1,id=root_port1,chassis=0,slot=1 \
--> +  -device cxl-upstream,bus=root_port0,id=us0,256b-flit=on \
    +  -device cxl-downstream,port=0,bus=us0,id=swport0,chassis=0,slot=4 \
--> +  -device cxl-type3,bus=swport0,volatile-memdev=cxl-mem0,id=cxl-mem0,sn=0x1,256b-flit=on,hdm-db=on \
    +  -device cxl-downstream,port=1,bus=us0,id=swport1,chassis=0,slot=5 \
--> +  -device cxl-type3,bus=swport1,volatile-memdev=cxl-mem1,id=cxl-mem1,sn=0x2,256b-flit=on,hdm-db=on \
    +  -device cxl-downstream,port=2,bus=us0,id=swport2,chassis=0,slot=6 \
    +  -device cxl-type3,bus=swport2,volatile-memdev=cxl-mem2,id=cxl-mem2,sn=0x3 \
    +  -device cxl-downstream,port=3,bus=us0,id=swport3,chassis=0,slot=7 \
    +  -device cxl-type3,bus=swport3,volatile-memdev=cxl-mem3,id=cxl-mem3,sn=0x4 \
    +  -M cxl-fmw.0.targets.0=cxl.1,cxl-fmw.0.size=4G,cxl-fmw.0.interleave-granularity=4k
    +

The purpose of 256b-flit=on is not explained there.  The only hint I can
find is in the commit message: "Devices require enabling Flit mode."
Which devices require what and when is less than clear.  Maybe hdm-db=on
requires 256b-flit=on?

Why does device cxl-upstream use 256b-flit=on without hdm-db=on?

I can't see where property "hdm-db" is defined.  Davidlohr, can you show
me?

I doubt users can figure out how to use this unless they're intimately
familiar with... what exactly?

>> > For the CXL root port and dsp cases, always report flit mode but
>> > the actual value after 'training' will depend on the downstream
>> > device configuration.
>> > 
>> > Suggested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>> > Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
>> 
>> Definitely include PCI maintainers on this.
>> +CC Michael, and Marcel.
>> 
>> Also Markus for command line bits.
>> 
>> Looks good to me.
>> 
>> Jonathan

[...]


  reply	other threads:[~2025-09-09 14:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11  3:34 [PATCH v2 -qemu 0/4] hw/cxl: Support Back-Invalidate Davidlohr Bueso
2025-08-11  3:34 ` [PATCH 1/4] hw/pcie: Support enabling flit mode Davidlohr Bueso
2025-08-11 15:57   ` Jonathan Cameron
2025-08-11 15:57     ` Jonathan Cameron via
2025-08-11 16:57     ` Michael S. Tsirkin
2025-09-09 14:47       ` Markus Armbruster [this message]
2025-09-10 18:34         ` Davidlohr Bueso
2025-08-11  3:34 ` [PATCH 2/4] hw/cxl: Refactor component register initialization Davidlohr Bueso
2025-08-11  3:34 ` [PATCH 3/4] hw/cxl: Allow BI by default in Window restrictions Davidlohr Bueso
2025-08-11  3:34 ` [PATCH 4/4] hw/cxl: Support type3 HDM-DB Davidlohr Bueso
2025-08-11 16:33   ` Jonathan Cameron
2025-08-11 16:33     ` Jonathan Cameron via
  -- strict thread matches above, loose matches on Subject: below --
2025-08-06  5:57 [PATCH -qemu 0/4] hw/cxl: Support Back-Invalidate Davidlohr Bueso
2025-08-06  5:57 ` [PATCH 1/4] hw/pcie: Support enabling flit mode Davidlohr Bueso
2025-08-08 15:42   ` Jonathan Cameron
2025-08-08 15:42     ` Jonathan Cameron via
2025-08-08 17:45     ` Davidlohr Bueso
2025-08-08 18:18     ` Markus Armbruster
2025-08-08 16:02   ` Jonathan Cameron
2025-08-08 16:02     ` Jonathan Cameron via

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=87qzwfvg17.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --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 \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.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 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.