OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio] RE: [virtio-comment] proposal: use admin command (and aq) of the device to query config space


On Wed, Aug 2, 2023 at 5:07âPM Parav Pandit <parav@nvidia.com> wrote:
>
>
> > From: Jason Wang <jasowang@redhat.com>
> > Sent: Wednesday, August 2, 2023 2:23 PM
> >
> > On Tue, Aug 1, 2023 at 3:09âPM Parav Pandit <parav@nvidia.com> wrote:
> > >
> > > One line proposal:
> > > Let's use new admin command and admin q for all device types to query
> > device config space for new fields. (always).
> >
> > Before we mandate anything to admin command, we need to first invent an
> > admin command over MMIO interface otherwise it would always be an issue
> > for the nesting.
> >
> Nesting can be independent requirement in itself.'

I don't understand here. If you tie new fields to the DMA interface,
it basically means nesting won't get any new features unless:

1) it's a PCI VF
2) SR-IOV emulation is done
3) admin virtqueue emulation is done

If you want differ nesting devices from others, it would be a
nightmare to maintain.

> > >
> > > Details below.
> > >
> > > Query of device capabilities and configuration using DMA interface.
> > > Need:
> > > Currently device configuration space is exposed as read only registers.
> >
> > This is wrong:
> >
> > 1) device configuration space is transport independent, some transport already
> > use DMA to access the device configuration space
> You can say ccw instead of "some". :)

Kind of but the transport vq proposal goes in the same way.

>
> > 2) device configuration space is not read only, we've already had several
> > examples of using it as write
> >
> It is even worse to have writable.

Well, what I meant is that, it's not necessarily read only and not
necessarily a register interface.

>
> > > It is growing rapidly.
> > > Some devices may be even multi-functionality device in coming future such as
> > net + clock + rdma device.
> > > For a PCI transport implementing such ever-growing capabilities,
> > configuration is burdensome as plain registers.
> >
> > We've already fixed size VIRTIO_PCI_CAP_PCI_CFG. What's wrong with that?
> >
> The wrong part is: it is still and indirect and slow, sub-optimal register interface.

Do we really care about the performance here? And if it is one of your
major concerns, it's better to explain it along with the
"ever-growing" concern.

>
> > And we have a lot of device specific virtqueues that could be used for
> > configuration.
> >
> Sure, this is the option_3 listed in here.
>
> > > Hence, it is required for the driver to query capabilities and configuration
> > using a DMA interface.
> > >
> > > Interface requirements:
> > > 1. Maintain backward compatibility for existing defined configuration fields to
> > stay as registers.
> > > 2. Any new field added must be accessed via DMA interface, regardless of
> > device implementation (hw/sw etc).
> > > Results in single driver code regardless of device implementation.
> >
> > Virtio is flexible as it decouples transport from the device model.
> > This breaks this flexibility, and this prevents non-DMA transport from being
> > developed.
> >
> VQ is decoupled from transport already.
> So, there is no flexibility broken.
> And yet you suggested transport dependent VIRTIO_PCI_CAP_PCI_CFG above making it further wrong. :)
>

The context here is that you want to mandate any new fields to be DMA.
DMA is obviously transport specific. There are transports that don't
use DMA at all (e.g the shared memory).

> > > 3. A device must be able to choose, starting from which field driver
> > > must query such configuration via DMA interface. This field offset must be
> > greater than currently defined configuration field.

[...]

> > >
> > > d. Any other option?
> >
> > Transport virtqueue on top of admin virtqueue will address this seamlessly.
> >
> :)
>
> Donât see why one would create few more objects on top of aq when aq or cvq itself can fulfil the need.
> Can you please elaborate?

If cvq can work, there's no need for any other methods. If you care
about admin virtqueue then device configuration space is not the only
thing that can be "ever growing", common_cfg is another one. Allowing
them to be accessed via a virtqueue (thus DMA in PCI transport) is
basically the idea of the transport virtqueue. Ling shan is rebasing
transport virtqueue proposals on top of admin commands, we can see
then.

Thanks



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]