qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (v


From: Cornelia Huck
Subject: Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (virtio-1)
Date: Tue, 30 Jul 2019 13:35:46 +0200

On Tue, 30 Jul 2019 12:25:30 +0200
Andrea Bolognani <address@hidden> wrote:

> On Mon, 2019-07-29 at 14:57 +0200, Sergio Lopez wrote:
> [...]
> >  /* virtio-mmio device */
> >  
> >  static Property virtio_mmio_properties[] = {
> >      DEFINE_PROP_BOOL("format_transport_address", VirtIOMMIOProxy,
> >                       format_transport_address, true),
> > +    DEFINE_PROP_BOOL("modern", VirtIOMMIOProxy, modern, false),
> >      DEFINE_PROP_END_OF_LIST(),
> >  };  
> 
> Not a QEMU developer so forgive me if I say something silly, but IIUC
> you'd be able to opt into the new feature by using eg.
> 
>   -device virtio-net-device,modern=on
> 
> However, virtio-pci devices already have a mechanism to control the
> VirtIO protocol version, where you use
> 
>   -device virtio-net-pci,disable-modern=no,disable-legacy=yes
> 
> to get a VirtIO 1.x-only device and
> 
>   -device virtio-net-pci,disable-modern=no,disable-legacy=no
> 
> for a transitional device.
> 
> Can you please make sure virtio-mmio uses the existing interface
> instead of introducing a new one?
> 

FWIW, I really hate virtio-pci's disable-modern/disable-legacy... for a
starter, what is 'modern'? Will we have 'ultra-modern' in the future?
It is also quite backwards with the 'disable' terminology.

We also have a different mechanism for virtio-ccw ('max_revision',
which covers a bit more than virtio-1; it doesn't have a 'min_revision',
as negotiating the revision down is fine), so I don't see why
virtio-mmio should replicate the virtio-pci mechanism.

Also, IIUC, virtio-mmio does not have transitional devices, but either
version 1 (legacy) or version 2 (virtio-1). It probably makes more
sense to expose the device version instead; either as an exact version
(especially if it isn't supposed to go up without incompatible
changes), or with some min/max concept (where version 1 would stand a
bit alone, so that would probably be a bit awkward.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]