]> Git Repo - qemu.git/commitdiff
Fix vmstate_register_ram() for rom/device regions
authorAvi Kivity <[email protected]>
Sun, 8 Jan 2012 11:18:19 +0000 (13:18 +0200)
committerAvi Kivity <[email protected]>
Sun, 8 Jan 2012 16:16:31 +0000 (18:16 +0200)
rom/device regions have a ram_addr that is composed of both an I/O handler
(low bits) and RAM region (high bits); but qemu_ram_set_idstr() expects just
a RAM region.  Mask the I/O handler to make it happy.

Tested-by: Stefan Weil <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
savevm.c

index 88c4bd8ea2ec087e5ed884cfb8fb3e14a48a8e19..80be1ff0634cd1fec7450c5e26c0e34a9a62cc44 100644 (file)
--- a/savevm.c
+++ b/savevm.c
@@ -2284,7 +2284,7 @@ void do_info_snapshots(Monitor *mon)
 
 void vmstate_register_ram(MemoryRegion *mr, DeviceState *dev)
 {
-    qemu_ram_set_idstr(memory_region_get_ram_addr(mr),
+    qemu_ram_set_idstr(memory_region_get_ram_addr(mr) & TARGET_PAGE_MASK,
                        memory_region_name(mr), dev);
 }
 
This page took 0.029133 seconds and 4 git commands to generate.