diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-05-24 16:10:39 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-05-29 16:27:32 +0200 |
commit | 791af8c861f4537ad29c34df14fb81701e04596f (patch) | |
tree | 79a3e97b084340de0c41954e834b797cf31936ac /include/exec | |
parent | a649b9168cb9169b41532b168b94294e2be32e50 (diff) | |
download | hqemu-791af8c861f4537ad29c34df14fb81701e04596f.zip hqemu-791af8c861f4537ad29c34df14fb81701e04596f.tar.gz |
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')
-rw-r--r-- | include/exec/exec-all.h | 6 | ||||
-rw-r--r-- | include/exec/softmmu_template.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 6362074..17fde25 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -367,9 +367,9 @@ bool is_tcg_gen_code(uintptr_t pc_ptr); #if !defined(CONFIG_USER_ONLY) struct MemoryRegion *iotlb_to_region(hwaddr index); -uint64_t io_mem_read(struct MemoryRegion *mr, hwaddr addr, - unsigned size); -void io_mem_write(struct MemoryRegion *mr, hwaddr addr, +bool io_mem_read(struct MemoryRegion *mr, hwaddr addr, + uint64_t *pvalue, unsigned size); +bool io_mem_write(struct MemoryRegion *mr, hwaddr addr, uint64_t value, unsigned size); void tlb_fill(CPUArchState *env1, target_ulong addr, int is_write, int mmu_idx, diff --git a/include/exec/softmmu_template.h b/include/exec/softmmu_template.h index 292ca02..8584902 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 */ |