Re: [PATCH] PCI: Skip the CXL state update for a VF

From: Richard Cheng

Date: Tue Nov 24 2026 - 04:20:07 EST


On Mon, Nov 23, 2026 at 04:19:56PM +0800, Joshua Machauer wrote:
> On Mon, Nov 23, 2026 at 11:29:10AM +0800, Richard Cheng wrote:
> > One nit on the sentence above, before this patch, each VF add also re-read
> > the Flex Bus Port Status of every bridge above the PF.
> > That refresh is now gone. I don't think anything depends on it, but
> > it is a behavior change, might be worth to mention it.
>
> [...]
>
> > I would like the spec section to be cited here, CXL r4.0, sec 8.1.8
> > "PCIe DVSEC for Flex Bus Port"
>
> Thanks. v2 states the dropped refresh and cites the spec section in
> the comment.
>
> > Is the walk to the RP needed, or would refreshing only the immediate parent
> > would be enough ?
> > If it's the former case, we can cut more cost for non-VF devices too.
>
> Refreshing the immediate parent looks enough to me. A device is only
> visible once the link to its parent's downstream port has trained, and
> the links further up were already read when the device directly below
> each of them was added. The link speed in pci_bus is handled that way
> too: it is read when the bus is added and updated on link events
> (retrain, bandwidth notification, hotplug), not on every child add.
>
> I don't have a system with a CXL switch to test that change on, so I
> have kept v2 to the VF case.
>
> Joshua

Ok, makes sense, thanks for clarifying this, I guess I'll work on this myself.
I'll cc you then.

Best regards,
Richard Cheng.