qemu-patch-raspberry4/hw/virtio
Michael S. Tsirkin 4d43d3f3c8 virtio-pci: fix migration for pci bus master
Current support for bus master (clearing OK bit)
together with the need to support guests which do not
enable PCI bus mastering, leads to extra state in
VIRTIO_PCI_FLAG_BUS_MASTER_BUG bit, which isn't robust
in case of cross-version migration for the case when
guests use the device before setting DRIVER_OK.

Rip out VIRTIO_PCI_FLAG_BUS_MASTER_BUG and implement a simpler
work-around: treat clearing of PCI_COMMAND as a virtio reset.  Old
guests never touch this bit so they will work.

As reset clears device status, DRIVER and MASTER bits are
now in sync, so we can fix up cross-version migration simply
by synchronising them, without need to detect a buggy guest
explicitly.

Drop tracking VIRTIO_PCI_FLAG_BUS_MASTER_BUG completely.

As reset makes the device quiescent, in the future we'll be able to drop
checking OK bit in a bunch of places.

Cc: Jason Wang <jasowang@redhat.com>
Cc: Greg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-09-18 21:51:24 +03:00
..
dataplane virtio-blk: embed VirtQueueElement in VirtIOBlockReq 2014-07-14 12:03:20 +02:00
Makefile.objs Add vhost-user as a vhost backend. 2014-06-19 16:41:56 +03:00
vhost-backend.c virtio: Move extern declaration to header file 2014-08-09 00:06:32 +04:00
vhost-user.c vhost-user: minor cleanups 2014-07-18 02:22:24 +03:00
vhost.c vhost_net: start/stop guest notifiers properly 2014-09-03 16:40:44 +03:00
virtio-balloon.c virtio-balloon: use virtio wrappers to access page frame numbers 2014-06-29 19:39:42 +03:00
virtio-bus.c virtio-bus: cleanup plug/unplug interface 2013-12-09 21:46:48 +01:00
virtio-mmio.c hw/virtio: enable common virtio feature for mmio device 2014-07-06 09:13:54 +03:00
virtio-pci.c virtio-pci: fix migration for pci bus master 2014-09-18 21:51:24 +03:00
virtio-pci.h virtio-blk: use aliases instead of duplicate qdev properties 2014-07-01 09:15:02 +02:00
virtio-rng.c virtio-rng: add some trace events 2014-08-12 14:29:55 +01:00
virtio.c Revert "virtio: don't call device on !vm_running" 2014-09-18 21:51:24 +03:00