aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-12-18 15:48:55 +0200
committerAvi Kivity <avi@redhat.com>2011-12-19 17:23:24 +0200
commitfce537d4a741521ac182d54465c568b101b9a71e (patch)
tree5eaa74102ac97de28b109d285c5eef65726d8eb5 /memory.c
parent5ab97b7f81dccccee03a3f1d03a4d09a27f0eeff (diff)
memory, xen: pass MemoryRegion to xen_ram_alloc()
Currently xen_ram_alloc() relies on ram_addr, which is going away. Give it something else to use as a cookie. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/memory.c b/memory.c
index adfdf1470c..1a42cea088 100644
--- a/memory.c
+++ b/memory.c
@@ -982,7 +982,7 @@ void memory_region_init_ram(MemoryRegion *mr,
memory_region_init(mr, name, size);
mr->terminates = true;
mr->destructor = memory_region_destructor_ram;
- mr->ram_addr = qemu_ram_alloc(dev, name, size);
+ mr->ram_addr = qemu_ram_alloc(dev, name, size, mr);
mr->backend_registered = true;
}
@@ -995,7 +995,7 @@ void memory_region_init_ram_ptr(MemoryRegion *mr,
memory_region_init(mr, name, size);
mr->terminates = true;
mr->destructor = memory_region_destructor_ram_from_ptr;
- mr->ram_addr = qemu_ram_alloc_from_ptr(dev, name, size, ptr);
+ mr->ram_addr = qemu_ram_alloc_from_ptr(dev, name, size, ptr, mr);
mr->backend_registered = true;
}
@@ -1022,7 +1022,7 @@ void memory_region_init_rom_device(MemoryRegion *mr,
mr->opaque = opaque;
mr->terminates = true;
mr->destructor = memory_region_destructor_rom_device;
- mr->ram_addr = qemu_ram_alloc(dev, name, size);
+ mr->ram_addr = qemu_ram_alloc(dev, name, size, mr);
mr->ram_addr |= cpu_register_io_memory(memory_region_read_thunk,
memory_region_write_thunk,
mr,