@@ -3124,6 +3124,9 @@ static bool primary_unplug_pending(void *opaque)
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
VirtIONet *n = VIRTIO_NET(vdev);
+ if (!virtio_vdev_has_feature(vdev, VIRTIO_NET_F_STANDBY)) {
+ return false;
+ }
return n->primary_dev ? n->primary_dev->pending_deleted_event : false;
}
@@ -1119,7 +1119,8 @@ int qemu_savevm_nr_failover_devices(void)
int n = 0;
QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
- if (se->vmsd && se->vmsd->dev_unplug_pending) {
+ if (se->vmsd && se->vmsd->dev_unplug_pending &&
+ se->vmsd->dev_unplug_pending(se->opaque)) {
n++;
}
}