]> git.proxmox.com Git - mirror_qemu.git/commitdiff
cpu_ldst.h: use correct guest address parameter
authorBobby Bingham <koorogi@koorogi.info>
Sun, 13 Nov 2016 05:05:23 +0000 (23:05 -0600)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 22 Nov 2016 22:26:51 +0000 (23:26 +0100)
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>
include/exec/cpu_ldst.h

index b573df53b059fc89532210e0cf3c1ad5f53d9b1b..6eb5fe80dcd9ab4cbd930f4dbded44f98e0e603a 100644 (file)
@@ -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];