Message ID | 1326025876-13241-1-git-send-email-avi@redhat.com |
---|---|
State | New |
Headers | show |
Am 08.01.2012 13:31, schrieb Avi Kivity: > 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() > excepts just > a RAM region. Mask the I/O handler to make it happy. > > Signed-off-by: Avi Kivity <avi@redhat.com> > --- > savevm.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/savevm.c b/savevm.c > index 88c4bd8..80be1ff 100644 > --- 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 patch fixes the assertion with flash memory (for example Mips Malta). Tested-by: Stefan Weil <sw@weilnetz.de>
Am 08.01.2012 13:31, schrieb Avi Kivity: > 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() excepts just expects :) - if you can still change it on your branch. Andreas > a RAM region. Mask the I/O handler to make it happy. > > Signed-off-by: Avi Kivity <avi@redhat.com> > --- > savevm.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/savevm.c b/savevm.c > index 88c4bd8..80be1ff 100644 > --- 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); > } >
On 01/08/2012 05:50 PM, Andreas Färber wrote: > Am 08.01.2012 13:31, schrieb Avi Kivity: > > 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() excepts just > > expects :) - if you can still change it on your branch. > Did so, hopefully Anthony will see the updated ref.
diff --git a/savevm.c b/savevm.c index 88c4bd8..80be1ff 100644 --- 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); }
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() excepts just a RAM region. Mask the I/O handler to make it happy. Signed-off-by: Avi Kivity <avi@redhat.com> --- savevm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)