Patchwork [36/66] vga: set owner in vga_update_memory_access

login
register
mail settings
Submitter Paolo Bonzini
Date July 4, 2013, 3:13 p.m.
Message ID <1372950842-32422-37-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/256925/
State New
Headers show

Comments

Paolo Bonzini - July 4, 2013, 3:13 p.m.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/display/vga.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/hw/display/vga.c b/hw/display/vga.c
index 7a6e935..1657356 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -198,7 +198,8 @@  static void vga_update_memory_access(VGACommonState *s)
         }
         base += isa_mem_base;
         region = g_malloc(sizeof(*region));
-        memory_region_init_alias(region, NULL, "vga.chain4", &s->vram, offset, size);
+        memory_region_init_alias(region, memory_region_owner(&s->vram),
+                                 "vga.chain4", &s->vram, offset, size);
         memory_region_add_subregion_overlap(s->legacy_address_space, base,
                                             region, 2);
         s->chain4_alias = region;