qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL] memory core fixes
@ 2012-01-08 14:01 Avi Kivity
  2012-01-09 14:51 ` Anthony Liguori
  0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2012-01-08 14:01 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

Please pull from

  git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/urgent

to receive fixes for recent memory core breakages.

Andreas Färber (2):
      memory: Fix memory_region_wrong_endianness()
      memory: Fix adjust_endianness()

Avi Kivity (2):
      kvm: fix build error in ppc kvm due to
memory_region_init_ram_ptr() change
      Fix vmstate_register_ram() for rom/device regions

 memory.c         |    3 ++-
 savevm.c         |    2 +-
 target-ppc/kvm.c |    3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/memory.c b/memory.c
index 394cbab..5ab2112 100644
--- a/memory.c
+++ b/memory.c
@@ -843,7 +843,7 @@ static void
memory_region_destructor_rom_device(MemoryRegion *mr)
 
 static bool memory_region_wrong_endianness(MemoryRegion *mr)
 {
-#ifdef TARGET_BIG_ENDIAN
+#ifdef TARGET_WORDS_BIGENDIAN
     return mr->ops->endianness == DEVICE_LITTLE_ENDIAN;
 #else
     return mr->ops->endianness == DEVICE_BIG_ENDIAN;
@@ -942,6 +942,7 @@ static void adjust_endianness(MemoryRegion *mr,
uint64_t *data, unsigned size)
             break;
         case 4:
             *data = bswap32(*data);
+            break;
         default:
             abort();
         }
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);
 }
 
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 9b2e605..ce8ac5b 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -822,7 +822,8 @@ off_t kvmppc_alloc_rma(const char *name,
MemoryRegion *sysmem)
     };
 
     rma_region = g_new(MemoryRegion, 1);
-    memory_region_init_ram_ptr(rma_region, NULL, name, size, rma);
+    memory_region_init_ram_ptr(rma_region, name, size, rma);
+    vmstate_register_ram_global(rma_region);
     memory_region_add_subregion(sysmem, 0, rma_region);
 
     return size;

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

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

* Re: [Qemu-devel] [PULL] memory core fixes
  2012-01-08 14:01 [Qemu-devel] [PULL] memory " Avi Kivity
@ 2012-01-09 14:51 ` Anthony Liguori
  0 siblings, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2012-01-09 14:51 UTC (permalink / raw)
  To: Avi Kivity; +Cc: qemu-devel

On 01/08/2012 08:01 AM, Avi Kivity wrote:
> Please pull from
>
>    git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/urgent
>
> to receive fixes for recent memory core breakages.

Pulled.  Thanks.

Regards,

Anthony Liguori

>
> Andreas Färber (2):
>        memory: Fix memory_region_wrong_endianness()
>        memory: Fix adjust_endianness()
>
> Avi Kivity (2):
>        kvm: fix build error in ppc kvm due to
> memory_region_init_ram_ptr() change
>        Fix vmstate_register_ram() for rom/device regions
>
>   memory.c         |    3 ++-
>   savevm.c         |    2 +-
>   target-ppc/kvm.c |    3 ++-
>   3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/memory.c b/memory.c
> index 394cbab..5ab2112 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -843,7 +843,7 @@ static void
> memory_region_destructor_rom_device(MemoryRegion *mr)
>
>   static bool memory_region_wrong_endianness(MemoryRegion *mr)
>   {
> -#ifdef TARGET_BIG_ENDIAN
> +#ifdef TARGET_WORDS_BIGENDIAN
>       return mr->ops->endianness == DEVICE_LITTLE_ENDIAN;
>   #else
>       return mr->ops->endianness == DEVICE_BIG_ENDIAN;
> @@ -942,6 +942,7 @@ static void adjust_endianness(MemoryRegion *mr,
> uint64_t *data, unsigned size)
>               break;
>           case 4:
>               *data = bswap32(*data);
> +            break;
>           default:
>               abort();
>           }
> 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);
>   }
>
> diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
> index 9b2e605..ce8ac5b 100644
> --- a/target-ppc/kvm.c
> +++ b/target-ppc/kvm.c
> @@ -822,7 +822,8 @@ off_t kvmppc_alloc_rma(const char *name,
> MemoryRegion *sysmem)
>       };
>
>       rma_region = g_new(MemoryRegion, 1);
> -    memory_region_init_ram_ptr(rma_region, NULL, name, size, rma);
> +    memory_region_init_ram_ptr(rma_region, name, size, rma);
> +    vmstate_register_ram_global(rma_region);
>       memory_region_add_subregion(sysmem, 0, rma_region);
>
>       return size;
>

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

* [Qemu-devel] [PULL] Memory core fixes
@ 2012-10-22 10:11 Avi Kivity
  2012-10-23 18:08 ` Anthony Liguori
  0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2012-10-22 10:11 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel

Please pull a few memory core fixes from:

  git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/urgent

Fixing ioeventfds on big endian systems, and potential use-after-free
(not really exploitable with the current code, but still).

----------------------------------------------------------------
Alexander Graf (1):
      memory: Make eventfd adhere to device endianness

Avi Kivity (2):
      i440fx: avoid destroying memory regions within a transaction
      memory: abort if a memory region is destroyed during a transaction

 hw/piix_pci.c | 69 +++++++++++++++++++++++++++++++++++----------------------------------
 memory.c      |  3 +++
 2 files changed, 38 insertions(+), 34 deletions(-)

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

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

* Re: [Qemu-devel] [PULL] Memory core fixes
  2012-10-22 10:11 [Qemu-devel] [PULL] Memory core fixes Avi Kivity
@ 2012-10-23 18:08 ` Anthony Liguori
  0 siblings, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2012-10-23 18:08 UTC (permalink / raw)
  To: Avi Kivity, qemu-devel

Avi Kivity <avi@redhat.com> writes:

> Please pull a few memory core fixes from:
>
>   git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/urgent
>
> Fixing ioeventfds on big endian systems, and potential use-after-free
> (not really exploitable with the current code, but still).

Pulled. Thanks.

Regards,

Anthony Liguori

>
> ----------------------------------------------------------------
> Alexander Graf (1):
>       memory: Make eventfd adhere to device endianness
>
> Avi Kivity (2):
>       i440fx: avoid destroying memory regions within a transaction
>       memory: abort if a memory region is destroyed during a transaction
>
>  hw/piix_pci.c | 69 +++++++++++++++++++++++++++++++++++----------------------------------
>  memory.c      |  3 +++
>  2 files changed, 38 insertions(+), 34 deletions(-)
>
> -- 
> error compiling committee.c: too many arguments to function

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

end of thread, other threads:[~2012-10-23 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-22 10:11 [Qemu-devel] [PULL] Memory core fixes Avi Kivity
2012-10-23 18:08 ` Anthony Liguori
  -- strict thread matches above, loose matches on Subject: below --
2012-01-08 14:01 [Qemu-devel] [PULL] memory " Avi Kivity
2012-01-09 14:51 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).