qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Subject: [Qemu-devel] [PULL 06/11] exec: dummy_section: Pass address space through.
Date: Wed, 18 Jun 2014 15:42:03 +0200	[thread overview]
Message-ID: <1403098928-30749-7-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1403098928-30749-1-git-send-email-pbonzini@redhat.com>

From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Rather than use the global singleton.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 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

  parent reply	other threads:[~2014-06-18 13:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 13:41 [Qemu-devel] [PULL 00/11] Memory API changes for 2014-06-18 Paolo Bonzini
2014-06-18 13:41 ` [Qemu-devel] [PULL 01/11] MAINTAINERS: Add myself as Memory API maintainer Paolo Bonzini
2014-06-18 13:41 ` [Qemu-devel] [PULL 02/11] exec: introduce qemu_ram_unset_idstr() to unset RAMBlock idstr Paolo Bonzini
2014-06-18 13:42 ` [Qemu-devel] [PULL 03/11] unset RAMBlock idstr when unregister MemoryRegion Paolo Bonzini
2014-06-18 13:42 ` [Qemu-devel] [PULL 04/11] memory: Don't update all memory region when ioeventfd changed Paolo Bonzini
2014-06-18 13:42 ` [Qemu-devel] [PULL 05/11] memory: Simplify mr_add_subregion() if-else Paolo Bonzini
2014-06-18 13:42 ` Paolo Bonzini [this message]
2014-06-18 13:42 ` [Qemu-devel] [PULL 07/11] qtest: fix qtest_clock_warp() for no deadline case Paolo Bonzini
2014-06-18 13:42 ` [Qemu-devel] [PULL 08/11] memory: MemoryRegion: factor out subregion add functionality Paolo Bonzini
2014-06-18 13:42 ` [Qemu-devel] [PULL 09/11] memory: MemoryRegion: factor out memory region re-adder Paolo Bonzini
2014-06-18 13:42 ` [Qemu-devel] [PULL 10/11] memory: MemoryRegion: rename parent to container Paolo Bonzini
2014-06-18 13:42 ` [Qemu-devel] [PULL 11/11] memory: Don't call memory_region_update_coalesced_range if nothing changed Paolo Bonzini
2014-06-18 15:28 ` [Qemu-devel] [PULL 00/11] Memory API changes for 2014-06-18 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403098928-30749-7-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).