All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix vmstate_register_ram() for rom/device regions
@ 2012-01-08 12:31 Avi Kivity
  2012-01-08 13:00 ` Stefan Weil
  2012-01-08 15:50 ` Andreas Färber
  0 siblings, 2 replies; 4+ messages in thread
From: Avi Kivity @ 2012-01-08 12:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: sw

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix vmstate_register_ram() for rom/device regions
  2012-01-08 12:31 [Qemu-devel] [PATCH] Fix vmstate_register_ram() for rom/device regions Avi Kivity
@ 2012-01-08 13:00 ` Stefan Weil
  2012-01-08 15:50 ` Andreas Färber
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Weil @ 2012-01-08 13:00 UTC (permalink / raw)
  To: Avi Kivity; +Cc: qemu-devel, Aurelien Jarno

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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix vmstate_register_ram() for rom/device regions
  2012-01-08 12:31 [Qemu-devel] [PATCH] Fix vmstate_register_ram() for rom/device regions Avi Kivity
  2012-01-08 13:00 ` Stefan Weil
@ 2012-01-08 15:50 ` Andreas Färber
  2012-01-08 16:17   ` Avi Kivity
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2012-01-08 15:50 UTC (permalink / raw)
  To: Avi Kivity; +Cc: sw, qemu-devel

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

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] Fix vmstate_register_ram() for rom/device regions
  2012-01-08 15:50 ` Andreas Färber
@ 2012-01-08 16:17   ` Avi Kivity
  0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2012-01-08 16:17 UTC (permalink / raw)
  To: Andreas Färber; +Cc: sw, qemu-devel

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.

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-08 16:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-08 12:31 [Qemu-devel] [PATCH] Fix vmstate_register_ram() for rom/device regions Avi Kivity
2012-01-08 13:00 ` Stefan Weil
2012-01-08 15:50 ` Andreas Färber
2012-01-08 16:17   ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.