From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9JXp-0007cc-Tm for qemu-devel@nongnu.org; Tue, 22 Nov 2016 17:28:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9JXl-0002xs-DM for qemu-devel@nongnu.org; Tue, 22 Nov 2016 17:28:05 -0500 Received: from mail-wj0-x243.google.com ([2a00:1450:400c:c01::243]:34697) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c9JXl-0002ww-7D for qemu-devel@nongnu.org; Tue, 22 Nov 2016 17:28:01 -0500 Received: by mail-wj0-x243.google.com with SMTP id xy5so7450108wjc.1 for ; Tue, 22 Nov 2016 14:28:01 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 22 Nov 2016 23:27:54 +0100 Message-Id: <1479853676-35995-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1479853676-35995-1-git-send-email-pbonzini@redhat.com> References: <1479853676-35995-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 1/3] cpu_ldst.h: use correct guest address parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Bobby Bingham From: Bobby Bingham 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 Message-Id: <20161113050523.23909-1-koorogi@koorogi.info> Signed-off-by: Paolo Bonzini --- include/exec/cpu_ldst.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index b573df5..6eb5fe8 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]; -- 1.8.3.1