summaryrefslogtreecommitdiff
path: root/memory.c
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 /memory.c
parent751d63c371045dafc76f0e87fcdc41967c59e04d (diff)
parentb5fe14cc7efa4e3ef58f591728e69203287a9de4 (diff)
Merge remote-tracking branch 'qemu-kvm/memory/core' into staging
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/memory.c b/memory.c
index 8e9ac460e..eb31fa8e5 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);