On Thu, Nov 15, 2018 at 11:50:56AM +0100, Cornelia Huck wrote: > On Thu, 15 Nov 2018 10:05:59 +0000 > Daniel P. Berrangé <berrange@xxxxxxxxxx> wrote: > > > On Wed, Nov 14, 2018 at 09:38:31PM -0200, Eduardo Habkost wrote: > > > Many of the current virtio-*-pci device types actually represent > > > 3 different types of devices: > > > * virtio 1.0 non-transitional devices > > > * virtio 1.0 transitional devices > > > * virtio 0.9 ("legacy device" in virtio 1.0 terminology) > > > > > > That would be just an annoyance if it didn't break our device/bus > > > compatibility QMP interfaces. With this multi-purpose device > > > type, there's no way to tell management software that > > > transitional devices and legacy devices require a Conventional > > > PCI bus. > > > > > > The multi-purpose device types would also prevent us from telling > > > management software what's the PCI vendor/device ID for them, > > > because their PCI IDs change at runtime depending on the bus > > > where they were plugged. > > > > > > This patch adds separate device types for each of those virtio > > > device flavors: > > > > > > - virtio-*-pci: the existing multi-purpose device types > > > - Configurable using `disable-legacy` and `disable-modern` > > > properties > > > - Legacy driver support is automatically enabled/disabled > > > depending on the bus where it is plugged > > > - Supports Conventional PCI and PCI Express buses > > > (but Conventional PCI is incompatible with > > > disable-legacy=off) > > > - Changes PCI vendor/device IDs at runtime > > > - virtio-*-pci-transitional: virtio-1.0 device supporting legacy drivers > > It's a virtio-1 (not 1.0) device. Otherwise, I like this terminology > better. > > > > - Supports Conventional PCI buses only, because > > > it has a PIO BAR > > > > Am I right in thinking that this is basically identical > > to virtio-*-pci, aside from only being valid for PCI > > buses ? > > > > IOW, libvirt can expose this device even if QEMU does > > not support it, by simply using the existing device > > type and only ever placing it in a PCI bus ? > > > > If libvirt did this compatibility approach, can you > > confirm this would be live migration state compatible. > > > > ie can live migrate virtio-*-pci -> virtio-*-pci-transitional, > > provided only PCI bus was used. > > It also needs to make sure that neither disable-legacy nor > disable-modern is set. Then this would have a compatible state AFAICS. That's ok, as libvirt doesn't expose disable-modern or disable-legacy right now. > > > - virtio-*-pci-non-transitional: modern-only > > > - Supports both Conventional PCI and PCI Express buses > > > > IIUC, libvirt can again provide compatibility with old > > QEMU by simply using the existing device type and setting > > disable-legacy ? Can you confirm this would be live > > migration compatible > > > > virtio-*-pci + disable-legacy -> virtio-*pci-non-transitional > > I think yes. > > [Out of curiosity, libvirt does not do anything with virtio-ccw's max > revision attribute, does it? QEMU uses this on a machine-type level for > compat handling, but I don't think it is useful beyond that. > Fortunately, virtio-ccw does not have complications like the > PCI/PCI-Express bus dependency.] I don't believe we ever set max revision. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list