diff options
author | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2014-06-02 19:08:44 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-06-17 16:07:37 +0200 |
commit | a656e22f0993ca1d84cabf47a33e99f27acc3a28 (patch) | |
tree | a69bc18b1f2b6a380a42ba29c27b2c12408117c7 /exec.c | |
parent | 3fb5bf5730b90c08d5d1c027900efae210d9b326 (diff) | |
download | qemu-a656e22f0993ca1d84cabf47a33e99f27acc3a28.zip qemu-a656e22f0993ca1d84cabf47a33e99f27acc3a28.tar.gz qemu-a656e22f0993ca1d84cabf47a33e99f27acc3a28.tar.bz2 |
exec: dummy_section: Pass address space through.
Rather than use the global singleton.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1776,10 +1776,12 @@ static subpage_t *subpage_init(AddressSpace *as, hwaddr base) return mmio; } -static uint16_t dummy_section(PhysPageMap *map, MemoryRegion *mr) +static uint16_t dummy_section(PhysPageMap *map, AddressSpace *as, + MemoryRegion *mr) { + assert(as); MemoryRegionSection section = { - .address_space = &address_space_memory, + .address_space = as, .mr = mr, .offset_within_address_space = 0, .offset_within_region = 0, @@ -1811,13 +1813,13 @@ static void mem_begin(MemoryListener *listener) AddressSpaceDispatch *d = g_new0(AddressSpaceDispatch, 1); uint16_t n; - n = dummy_section(&d->map, &io_mem_unassigned); + n = dummy_section(&d->map, as, &io_mem_unassigned); assert(n == PHYS_SECTION_UNASSIGNED); - n = dummy_section(&d->map, &io_mem_notdirty); + n = dummy_section(&d->map, as, &io_mem_notdirty); assert(n == PHYS_SECTION_NOTDIRTY); - n = dummy_section(&d->map, &io_mem_rom); + n = dummy_section(&d->map, as, &io_mem_rom); assert(n == PHYS_SECTION_ROM); - n = dummy_section(&d->map, &io_mem_watch); + n = dummy_section(&d->map, as, &io_mem_watch); assert(n == PHYS_SECTION_WATCH); d->phys_map = (PhysPageEntry) { .ptr = PHYS_MAP_NODE_NIL, .skip = 1 }; |