Fix vmstate_register_ram() for rom/device regions

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 <sw@weilnetz.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Avi Kivity 2012-01-08 13:18:19 +02:00
parent 1470a0cdca
commit 1ddde08780

View File

@ -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);
}