[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v1 04/11] exec: dummy_section: Pass address spac
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [RFC PATCH v1 04/11] exec: dummy_section: Pass address space through. |
Date: |
Mon, 2 Jun 2014 19:08:44 -0700 |
Rather than use the global singleton.
Signed-off-by: Peter Crosthwaite <address@hidden>
---
exec.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/exec.c b/exec.c
index 32cc099..aa39f6c 100644
--- a/exec.c
+++ b/exec.c
@@ -1760,10 +1760,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,
@@ -1795,13 +1797,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 };
--
2.0.0
- [Qemu-devel] [RFC PATCH v1 00/11] Per Master Addressing (PMA), Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 01/11] microblaze: ml605: Get rid of useless ddr_base variable, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 02/11] dma: axidma: Variablise repeated s->streams[i] sub-expr, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 03/11] exec: Parent root MRs to the machine, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 04/11] exec: dummy_section: Pass address space through.,
Peter Crosthwaite <=
- [Qemu-devel] [RFC PATCH v1 05/11] memory: Parent Memory Regions to their registered owners, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 06/11] memory: address_space_init: do nothing if no root region given, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 07/11] memory.c: Add address_space_init_shareable(), Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 08/11] qom/cpu: Add Memory Region Property, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 09/11] exec: use per-cpu address-spaces for cpuisms, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 10/11] microblaze: ml605: Convert to PMA, Peter Crosthwaite, 2014/06/02
- [Qemu-devel] [RFC PATCH v1 11/11] dma: axidma: Convert to PMA, Peter Crosthwaite, 2014/06/02
- Re: [Qemu-devel] [RFC PATCH v1 00/11] Per Master Addressing (PMA), Paolo Bonzini, 2014/06/03