aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-06-15 14:57:14 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-06-15 15:23:34 +0100
commit2d54f19401bc54b3b56d1cc44c96e4087b604b97 (patch)
treed284c1967616f8f77fc36226f64459c2bb362bba /exec.c
parentace4109011b4912b24e76f152e2cf010e78819c5 (diff)
downloadqemu-2d54f19401bc54b3b56d1cc44c96e4087b604b97.zip
qemu-2d54f19401bc54b3b56d1cc44c96e4087b604b97.tar.gz
qemu-2d54f19401bc54b3b56d1cc44c96e4087b604b97.tar.bz2
cputlb: Pass cpu_transaction_failed() the correct physaddr
The API for cpu_transaction_failed() says that it takes the physical address for the failed transaction. However we were actually passing it the offset within the target MemoryRegion. We don't currently have any target CPU implementations of this hook that require the physical address; fix this bug so we don't get confused if we ever do add one. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20180611125633.32755-3-peter.maydell@linaro.org
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/exec.c b/exec.c
index f6645ed..9cbba6a 100644
--- a/exec.c
+++ b/exec.c
@@ -2897,14 +2897,15 @@ static const MemoryRegionOps readonly_mem_ops = {
},
};
-MemoryRegion *iotlb_to_region(CPUState *cpu, hwaddr index, MemTxAttrs attrs)
+MemoryRegionSection *iotlb_to_section(CPUState *cpu,
+ hwaddr index, MemTxAttrs attrs)
{
int asidx = cpu_asidx_from_attrs(cpu, attrs);
CPUAddressSpace *cpuas = &cpu->cpu_ases[asidx];
AddressSpaceDispatch *d = atomic_rcu_read(&cpuas->memory_dispatch);
MemoryRegionSection *sections = d->map.sections;
- return sections[index & ~TARGET_PAGE_MASK].mr;
+ return &sections[index & ~TARGET_PAGE_MASK];
}
static void io_mem_init(void)