aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2011-07-08 10:44:35 +0200
committerGerd Hoffmann <kraxel@redhat.com>2011-07-20 09:23:33 +0200
commit2837c8ea1f10c281c9ff68f397405f3596f8ce0b (patch)
treeaab0c8f17e3b40824a419fd9c3e50f25e98d376e /savevm.c
parent03ff09580ef6cbc4a893b6e3e6bbff33180ec70a (diff)
vmstate: add no_migrate flag to VMStateDescription
This allows to easily tag devices as non-migratable, so any attempt to migrate a virtual machine with the device in question active will make migration fail. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/savevm.c b/savevm.c
index 8139bc7e29..1c5abe2476 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1234,6 +1234,7 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
se->opaque = opaque;
se->vmsd = vmsd;
se->alias_id = alias_id;
+ se->no_migrate = vmsd->unmigratable;
if (dev && dev->parent_bus && dev->parent_bus->info->get_dev_path) {
char *id = dev->parent_bus->info->get_dev_path(dev);