aboutsummaryrefslogtreecommitdiff
path: root/include/exec/softmmu_template.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-05-24 16:10:39 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-05-29 16:27:32 +0200
commit791af8c861f4537ad29c34df14fb81701e04596f (patch)
tree79a3e97b084340de0c41954e834b797cf31936ac /include/exec/softmmu_template.h
parenta649b9168cb9169b41532b168b94294e2be32e50 (diff)
memory: propagate errors on I/O dispatch
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/exec/softmmu_template.h')
-rw-r--r--include/exec/softmmu_template.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/exec/softmmu_template.h b/include/exec/softmmu_template.h
index 292ca02bc5..8584902cbe 100644
--- a/include/exec/softmmu_template.h
+++ b/include/exec/softmmu_template.h
@@ -63,6 +63,7 @@ static inline DATA_TYPE glue(io_read, SUFFIX)(CPUArchState *env,
target_ulong addr,
uintptr_t retaddr)
{
+ uint64_t val;
MemoryRegion *mr = iotlb_to_region(physaddr);
physaddr = (physaddr & TARGET_PAGE_MASK) + addr;
@@ -72,7 +73,8 @@ static inline DATA_TYPE glue(io_read, SUFFIX)(CPUArchState *env,
}
env->mem_io_vaddr = addr;
- return io_mem_read(mr, physaddr, 1 << SHIFT);
+ io_mem_read(mr, physaddr, &val, 1 << SHIFT);
+ return val;
}
/* handle all cases except unaligned access which span two pages */