[RFC PATCH v2 0/8] virtio-net failover cleanup and new features

Laurent Vivier posted 8 patches 2 years, 8 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210820142002.152994-1-lvivier@redhat.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Alex Williamson <alex.williamson@redhat.com>, Markus Armbruster <armbru@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
include/hw/pci/pci.h           |   5 +
include/hw/qdev-core.h         |   6 +-
include/hw/virtio/virtio-net.h |   4 -
include/hw/virtio/virtio.h     |   1 -
include/qemu/option.h          |   4 +
hw/core/qdev.c                 |   5 +-
hw/net/virtio-net.c            | 149 +-------------------
hw/pci/pci.c                   | 242 +++++++++++++++++++++++++++++++--
hw/vfio/pci.c                  |   2 +-
softmmu/qdev-monitor.c         |  14 +-
util/qemu-option.c             |  82 +++++++++++
11 files changed, 338 insertions(+), 176 deletions(-)
[RFC PATCH v2 0/8] virtio-net failover cleanup and new features
Posted by Laurent Vivier 2 years, 8 months ago
v2: add helpers to manage the list of hidden devices rather
    than relying on the command line parameters
    Hide VFIO device if it is plugged before the virtio-net one

This series moves the code used by virtio-net failover from the
virtio-net device to the PCI subsystem.

Doing that, we can use failover with a regular QEMU PCI device
(we can add the function call to unregister the ROM vmstate) and we
can also use this code to unplug a PCI card before migration
and plug it back after migration without using a failover
device (of course, connectivity is lost during all the migration).
In contrary of failover, this does not need support from the
guest system to work.

Laurent Vivier (8):
  qdev: add an Error parameter to the DeviceListener hide_device()
    function
  qdev/qbus: remove failover specific code
  failover: virtio-net: remove failover_primary_hidden flag
  failover: pci: move failover hotplug/unplug code into pci subsystem
  failover: hide the PCI device if the virtio-net device is not present
  failover: pci: unregister ROM on unplug
  pci: automatically unplug a PCI card before migration
  failover: qemu-opts: manage hidden device list

 include/hw/pci/pci.h           |   5 +
 include/hw/qdev-core.h         |   6 +-
 include/hw/virtio/virtio-net.h |   4 -
 include/hw/virtio/virtio.h     |   1 -
 include/qemu/option.h          |   4 +
 hw/core/qdev.c                 |   5 +-
 hw/net/virtio-net.c            | 149 +-------------------
 hw/pci/pci.c                   | 242 +++++++++++++++++++++++++++++++--
 hw/vfio/pci.c                  |   2 +-
 softmmu/qdev-monitor.c         |  14 +-
 util/qemu-option.c             |  82 +++++++++++
 11 files changed, 338 insertions(+), 176 deletions(-)

-- 
2.31.1