aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-29 08:48:43 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-29 08:48:43 -0500
commit950c671df1078f4505d1b8461620f48aa91a9fda (patch)
tree95dbfab8b8be92df153c23313df99cd5105852b0
parent751d63c371045dafc76f0e87fcdc41967c59e04d (diff)
parentb5fe14cc7efa4e3ef58f591728e69203287a9de4 (diff)
Merge remote-tracking branch 'qemu-kvm/memory/core' into staging
-rw-r--r--memory.c5
-rw-r--r--memory.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/memory.c b/memory.c
index 8e9ac460e8..eb31fa8e58 100644
--- a/memory.c
+++ b/memory.c
@@ -304,7 +304,7 @@ static void as_memory_range_add(AddressSpace *as, FlatRange *fr)
}
if (!fr->readable) {
- phys_offset &= TARGET_PAGE_MASK;
+ phys_offset &= ~TARGET_PAGE_MASK & ~IO_MEM_ROMD;
}
cpu_register_physical_memory_log(fr->addr.start,
@@ -962,11 +962,14 @@ void memory_region_init_alias(MemoryRegion *mr,
void memory_region_init_rom_device(MemoryRegion *mr,
const MemoryRegionOps *ops,
+ void *opaque,
DeviceState *dev,
const char *name,
uint64_t size)
{
memory_region_init(mr, name, size);
+ mr->ops = ops;
+ mr->opaque = opaque;
mr->terminates = true;
mr->destructor = memory_region_destructor_rom_device;
mr->ram_addr = qemu_ram_alloc(dev, name, size);
diff --git a/memory.h b/memory.h
index 0553cc7526..06b83ae76b 100644
--- a/memory.h
+++ b/memory.h
@@ -235,6 +235,7 @@ void memory_region_init_alias(MemoryRegion *mr,
*/
void memory_region_init_rom_device(MemoryRegion *mr,
const MemoryRegionOps *ops,
+ void *opaque,
DeviceState *dev, /* FIXME: layering violation */
const char *name,
uint64_t size);