mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
03ff09580e
commit
2837c8ea1f
2 changed files with 2 additions and 0 deletions
1
savevm.c
1
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue