mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
savevm: Add DeviceState param
When available, we'd like to be able to access the DeviceState when registering a savevm. For buses with a get_dev_path() function, this will allow us to create more unique savevm id strings. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
4f43c1ff3b
commit
0be71e324f
85 changed files with 163 additions and 138 deletions
|
@ -354,7 +354,8 @@ static int stellaris_gptm_init(SysBusDevice *dev)
|
|||
s->opaque[0] = s->opaque[1] = s;
|
||||
s->timer[0] = qemu_new_timer(vm_clock, gptm_tick, &s->opaque[0]);
|
||||
s->timer[1] = qemu_new_timer(vm_clock, gptm_tick, &s->opaque[1]);
|
||||
register_savevm("stellaris_gptm", -1, 1, gptm_save, gptm_load, s);
|
||||
register_savevm(&dev->qdev, "stellaris_gptm", -1, 1,
|
||||
gptm_save, gptm_load, s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -673,7 +674,7 @@ static int stellaris_sys_init(uint32_t base, qemu_irq irq,
|
|||
ssys_writefn, s);
|
||||
cpu_register_physical_memory(base, 0x00001000, iomemtype);
|
||||
ssys_reset(s);
|
||||
register_savevm("stellaris_sys", -1, 1, ssys_save, ssys_load, s);
|
||||
register_savevm(NULL, "stellaris_sys", -1, 1, ssys_save, ssys_load, s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -887,7 +888,7 @@ static int stellaris_i2c_init(SysBusDevice * dev)
|
|||
sysbus_init_mmio(dev, 0x1000, iomemtype);
|
||||
/* ??? For now we only implement the master interface. */
|
||||
stellaris_i2c_reset(s);
|
||||
register_savevm("stellaris_i2c", -1, 1,
|
||||
register_savevm(&dev->qdev, "stellaris_i2c", -1, 1,
|
||||
stellaris_i2c_save, stellaris_i2c_load, s);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1196,7 +1197,7 @@ static int stellaris_adc_init(SysBusDevice *dev)
|
|||
sysbus_init_mmio(dev, 0x1000, iomemtype);
|
||||
stellaris_adc_reset(s);
|
||||
qdev_init_gpio_in(&dev->qdev, stellaris_adc_trigger, 1);
|
||||
register_savevm("stellaris_adc", -1, 1,
|
||||
register_savevm(&dev->qdev, "stellaris_adc", -1, 1,
|
||||
stellaris_adc_save, stellaris_adc_load, s);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1256,7 +1257,7 @@ static int stellaris_ssi_bus_init(SSISlave *dev)
|
|||
s->bus[1] = ssi_create_bus(&dev->qdev, "ssi1");
|
||||
qdev_init_gpio_in(&dev->qdev, stellaris_ssi_bus_select, 1);
|
||||
|
||||
register_savevm("stellaris_ssi_bus", -1, 1,
|
||||
register_savevm(&dev->qdev, "stellaris_ssi_bus", -1, 1,
|
||||
stellaris_ssi_bus_save, stellaris_ssi_bus_load, s);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue