From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxG8I-0005nq-Jb for qemu-devel@nongnu.org; Wed, 18 Jun 2014 09:42:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxG8D-00005M-2V for qemu-devel@nongnu.org; Wed, 18 Jun 2014 09:42:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxG8B-0008WV-Ab for qemu-devel@nongnu.org; Wed, 18 Jun 2014 09:42:28 -0400 From: Paolo Bonzini Date: Wed, 18 Jun 2014 15:42:03 +0200 Message-Id: <1403098928-30749-7-git-send-email-pbonzini@redhat.com> In-Reply-To: <1403098928-30749-1-git-send-email-pbonzini@redhat.com> References: <1403098928-30749-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 06/11] exec: dummy_section: Pass address space through. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Crosthwaite From: Peter Crosthwaite Rather than use the global singleton. Signed-off-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- exec.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/exec.c b/exec.c index 6ce989a..c3fbbb3 100644 --- a/exec.c +++ b/exec.c @@ -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 }; -- 1.8.3.1