[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 27/30] exec: change some APIs to take AddressSpaceDi
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 27/30] exec: change some APIs to take AddressSpaceDispatch |
Date: |
Fri, 28 Jun 2013 20:26:46 +0200 |
Signed-off-by: Paolo Bonzini <address@hidden>
---
exec.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/exec.c b/exec.c
index 7f87e16..528c4d7 100644
--- a/exec.c
+++ b/exec.c
@@ -236,11 +236,10 @@ bool memory_region_is_unassigned(MemoryRegion *mr)
&& mr != &io_mem_watch;
}
-static MemoryRegionSection *address_space_lookup_region(AddressSpace *as,
+static MemoryRegionSection *address_space_lookup_region(AddressSpaceDispatch
*d,
hwaddr addr,
bool resolve_subpage)
{
- AddressSpaceDispatch *d = as->dispatch;
MemoryRegionSection *section;
subpage_t *subpage;
@@ -254,13 +253,13 @@ static MemoryRegionSection
*address_space_lookup_region(AddressSpace *as,
}
static MemoryRegionSection *
-address_space_translate_internal(AddressSpace *as, hwaddr addr, hwaddr *xlat,
+address_space_translate_internal(AddressSpaceDispatch *d, hwaddr addr, hwaddr
*xlat,
hwaddr *plen, bool resolve_subpage)
{
MemoryRegionSection *section;
Int128 diff;
- section = address_space_lookup_region(as, addr, resolve_subpage);
+ section = address_space_lookup_region(d, addr, resolve_subpage);
/* Compute offset within MemoryRegionSection */
addr -= section->offset_within_address_space;
@@ -282,7 +281,7 @@ MemoryRegion *address_space_translate(AddressSpace *as,
hwaddr addr,
hwaddr len = *plen;
for (;;) {
- section = address_space_translate_internal(as, addr, &addr, plen,
true);
+ section = address_space_translate_internal(as->dispatch, addr, &addr,
plen, true);
mr = section->mr;
if (!mr->iommu_ops) {
@@ -311,7 +310,7 @@ address_space_translate_for_iotlb(AddressSpace *as, hwaddr
addr, hwaddr *xlat,
hwaddr *plen)
{
MemoryRegionSection *section;
- section = address_space_translate_internal(as, addr, xlat, plen, false);
+ section = address_space_translate_internal(as->dispatch, addr, xlat, plen,
false);
assert(!section->mr->iommu_ops);
return section;
--
1.8.1.4
- [Qemu-devel] [PATCH 17/30] migration: report RCU quiescent states, (continued)
- [Qemu-devel] [PATCH 17/30] migration: report RCU quiescent states, Paolo Bonzini, 2013/06/28
- [Qemu-devel] [PATCH 19/30] memory: avoid ref/unref in memory_region_find, Paolo Bonzini, 2013/06/28
- [Qemu-devel] [PATCH 18/30] memory: protect current_map by RCU, Paolo Bonzini, 2013/06/28
- [Qemu-devel] [PATCH 20/30] exec: change well-known physical sections to macros, Paolo Bonzini, 2013/06/28
- [Qemu-devel] [PATCH 21/30] exec: separate current memory map from the one being built, Paolo Bonzini, 2013/06/28
- [Qemu-devel] [PATCH 22/30] memory: move MemoryListener declaration earlier, Paolo Bonzini, 2013/06/28
- [Qemu-devel] [PATCH 23/30] exec: move listener from AddressSpaceDispatch to AddressSpace, Paolo Bonzini, 2013/06/28
- [Qemu-devel] [PATCH 24/30] exec: separate current radix tree from the one being built, Paolo Bonzini, 2013/06/28
- [Qemu-devel] [PATCH 26/30] exec: remove cur_map, Paolo Bonzini, 2013/06/28
- [Qemu-devel] [PATCH 25/30] exec: put memory map in AddressSpaceDispatch, Paolo Bonzini, 2013/06/28
- [Qemu-devel] [PATCH 27/30] exec: change some APIs to take AddressSpaceDispatch,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 28/30] exec: change iotlb APIs to take AddressSpaceDispatch, Paolo Bonzini, 2013/06/28
- [Qemu-devel] [PATCH 29/30] exec: add a reference to the region returned by address_space_translate, Paolo Bonzini, 2013/06/28
- [Qemu-devel] [PATCH 30/30] exec: put address space dispatch under RCU critical section, Paolo Bonzini, 2013/06/28