diff options
author | Avi Kivity | 2011-12-20 14:59:12 +0100 |
---|---|---|
committer | Avi Kivity | 2012-01-04 12:34:48 +0100 |
commit | c5705a7728b4a6bc9e4f2d35911adbaf28042b25 (patch) | |
tree | e96a1e0c9fbd0fa3624b5454038659775c81fba2 /hw/virtex_ml507.c | |
parent | memory: introduce memory_region_name() (diff) | |
download | qemu-c5705a7728b4a6bc9e4f2d35911adbaf28042b25.tar.gz qemu-c5705a7728b4a6bc9e4f2d35911adbaf28042b25.tar.xz qemu-c5705a7728b4a6bc9e4f2d35911adbaf28042b25.zip |
vmstate, memory: decouple vmstate from memory API
Currently creating a memory region automatically registers it for
live migration. This differs from other state (which is enumerated
in a VMStateDescription structure) and ties the live migration code
into the memory core.
Decouple the two by introducing a separate API, vmstate_register_ram(),
for registering a RAM block for migration. Currently the same
implementation is reused, but later it can be moved into a separate list,
and registrations can be moved to VMStateDescription blocks.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/virtex_ml507.c')
-rw-r--r-- | hw/virtex_ml507.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/virtex_ml507.c b/hw/virtex_ml507.c index 6ffb896b7b..bd16b97934 100644 --- a/hw/virtex_ml507.c +++ b/hw/virtex_ml507.c @@ -205,7 +205,8 @@ static void virtex_init(ram_addr_t ram_size, env = ppc440_init_xilinx(&ram_size, 1, cpu_model, 400000000); qemu_register_reset(main_cpu_reset, env); - memory_region_init_ram(phys_ram, NULL, "ram", ram_size); + memory_region_init_ram(phys_ram, "ram", ram_size); + vmstate_register_ram_global(phys_ram); memory_region_add_subregion(address_space_mem, ram_base, phys_ram); dinfo = drive_get(IF_PFLASH, 0, 0); |