From d46e52d9d07a035f545c90d421f71c514bd77efd Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Thu, 1 Mar 2018 08:56:30 -0500 Subject: [PATCH] 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. Backports commit c2a85316902e67530da9d6548139fcce73c0cac6 from qemu --- qemu/include/exec/cpu_ldst.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/include/exec/cpu_ldst.h b/qemu/include/exec/cpu_ldst.h index b47790d6..bd37a55a 100644 --- a/qemu/include/exec/cpu_ldst.h +++ b/qemu/include/exec/cpu_ldst.h @@ -459,7 +459,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];