aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-06-02 15:27:39 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-07-04 17:42:50 +0200
commitc7086b4a237520d2bbe5146d8b1ace1894c2b2bf (patch)
tree3624fec1ce694a5444aa6103e9959f531cadc14d /exec.c
parent6092666ebdc68b2634db050689292c71a5c368c0 (diff)
downloadqemu-c7086b4a237520d2bbe5146d8b1ace1894c2b2bf.zip
qemu-c7086b4a237520d2bbe5146d8b1ace1894c2b2bf.tar.gz
qemu-c7086b4a237520d2bbe5146d8b1ace1894c2b2bf.tar.bz2
exec: change some APIs to take AddressSpaceDispatch
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/exec.c b/exec.c
index 7a6d969..03fdf7e 100644
--- a/exec.c
+++ b/exec.c
@@ -230,11 +230,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;
@@ -248,13 +247,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;
@@ -276,7 +275,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) {
@@ -305,7 +304,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;