From 38e0735eb76a1479917ef3501a208d4f70998494 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Mon, 14 Nov 2011 15:09:44 -0600 Subject: ivshmem: use migration blockers to prevent live migration in peer mode (v2) Now when you try to migrate with ivshmem, you get a proper QMP error: (qemu) migrate tcp:localhost:1025 Migration is disabled when using feature 'peer mode' in device 'ivshmem' (qemu) Signed-off-by: Anthony Liguori --- savevm.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'savevm.c') diff --git a/savevm.c b/savevm.c index bee16c0b7..f53cd4c15 100644 --- a/savevm.c +++ b/savevm.c @@ -1255,31 +1255,6 @@ void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque) } } -/* mark a device as not to be migrated, that is the device should be - unplugged before migration */ -void register_device_unmigratable(DeviceState *dev, const char *idstr, - void *opaque) -{ - SaveStateEntry *se; - char id[256] = ""; - - if (dev && dev->parent_bus && dev->parent_bus->info->get_dev_path) { - char *path = dev->parent_bus->info->get_dev_path(dev); - if (path) { - pstrcpy(id, sizeof(id), path); - pstrcat(id, sizeof(id), "/"); - g_free(path); - } - } - pstrcat(id, sizeof(id), idstr); - - QTAILQ_FOREACH(se, &savevm_handlers, entry) { - if (strcmp(se->idstr, id) == 0 && se->opaque == opaque) { - se->no_migrate = 1; - } - } -} - int vmstate_register_with_alias_id(DeviceState *dev, int instance_id, const VMStateDescription *vmsd, void *opaque, int alias_id, -- cgit v1.2.3