[virtio-dev] Re: [PATCH 08/11] transport-pci: Introduce virtio extended capability

Michael S. Tsirkin
2023-05-21T05:57:52Z

On Fri, May 19, 2023 at 09:02:58PM +0000, Parav Pandit wrote:
> > From: Michael S. Tsirkin <mst@redhat.com>
> > Sent: Friday, May 19, 2023 2:10 AM
> >
> > So looking at this in isolation, it probably warrants an extra github issue. So I
> > would like to find out whether we should introduce this capability and switch to
> > it for new devices.
> >
> > My main question is whether e.g. seabios will be able to use it.
> > Could you take a look at the source and let us all know?
> >
> Existing unmodified seabios cannot use it because it is not looking at the new offset and cap_id.

Yes but neither can it support new devices because it does not look
for the new device id. So it's fine - I was talking about new devices
using extended capability.

We shouldn't just laser-focus on existing software and devices,
there's probably more to come.

> But that is the case with any existing software, not just seabios.
>
> New capability is in addition to the existing one.
> And code already exists to refer to the old one, so I am not seeing any gain to create them now.
> Any new capability that one creates in the future can be in the extended area.

Question is about MCFG in general. Is adding capability to access MCFG
to seabios for pci accesses practical? hard?

> You mentioned a perf angle that it takes half the time, but I don't
> see how as the only change between legacy and ext is: offset.

For a variety of reasons Linux does not use memory mapped
accesses for legacy config space, it uses cf8/cfc for that.

--
MST