@@ -29,6 +29,7 @@
#include "sysemu/dma.h"
#include "sysemu/tcg.h"
#include "trace.h"
+#include "sysemu/sysemu.h"
/* enabled until disconnected backend stabilizes */
#define _VHOST_DEBUG 1
@@ -1773,3 +1774,14 @@ int vhost_net_set_backend(struct vhost_dev *hdev,
return -1;
}
+
+void reset_vhost_devices(void)
+{
+ struct vhost_dev *dev;
+
+ QLIST_FOREACH(dev, &vhost_devices, entry) {
+ if (dev->vhost_ops->vhost_reset_device(dev) < 0) {
+ VHOST_OPS_DEBUG("vhost_reset_device failed");
+ }
+ }
+}
@@ -30,6 +30,7 @@ void load_cpr_snapshot(const char *file, Error **errp);
void save_chardev_fds(void);
void save_vnc_fds(void);
void load_vnc_fds(void);
+void reset_vhost_devices(void);
void save_qmp_negotiation_status(void);
extern int autostart;
@@ -2770,6 +2770,7 @@ void save_cpr_snapshot(const char *file, const char *mode, Error **errp)
save_chardev_fds();
save_vnc_fds();
walkenv(FD_PREFIX, preserve_fd, 0);
+ reset_vhost_devices();
save_qmp_negotiation_status();
qemu_system_exec_request();
putenv((char *)"QEMU_START_FREEZE=");