From fce537d4a741521ac182d54465c568b101b9a71e Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 18 Dec 2011 15:48:55 +0200 Subject: 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 --- memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'memory.c') 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, -- cgit v1.2.3