summaryrefslogtreecommitdiffstats
path: root/include/exec
diff options
context:
space:
mode:
authorBobby Bingham2016-11-13 06:05:23 +0100
committerPaolo Bonzini2016-11-22 23:26:51 +0100
commitc2a85316902e67530da9d6548139fcce73c0cac6 (patch)
treeb78bacefa3ebff11fe681a1497fc2287b76110b7 /include/exec
parentFix FreeBSD (10.x) build after 7dc9ae43 (diff)
downloadqemu-c2a85316902e67530da9d6548139fcce73c0cac6.tar.gz
qemu-c2a85316902e67530da9d6548139fcce73c0cac6.tar.xz
qemu-c2a85316902e67530da9d6548139fcce73c0cac6.zip
cpu_ldst.h: use correct guest address parameter
In the user emulation code path, tlb_vaddr_to_host erronesously passed vaddr as the guest address to be translated, instead of addr, the parameter which actually contained the guest address. This resulted in incorrect addresses being used when emulating block copy (mvc/mvpg) and block clear (xc) instructions for the s390x target. Signed-off-by: Bobby Bingham <koorogi@koorogi.info> Message-Id: <20161113050523.23909-1-koorogi@koorogi.info> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/cpu_ldst.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
index b573df53b0..6eb5fe80dc 100644
--- a/include/exec/cpu_ldst.h
+++ b/include/exec/cpu_ldst.h
@@ -401,7 +401,7 @@ static inline void *tlb_vaddr_to_host(CPUArchState *env, target_ulong addr,
int access_type, int mmu_idx)
{
#if defined(CONFIG_USER_ONLY)
- return g2h(vaddr);
+ return g2h(addr);
#else
int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
CPUTLBEntry *tlbentry = &env->tlb_table[mmu_idx][index];