From patchwork Fri Oct 25 14:21:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 177754 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3802488ill; Fri, 25 Oct 2019 07:41:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEvxT0za9sLum4ixJ9+jpqX25TQY0rkeQo/BCjpfltJBgfcutRczhtqM1Pn4E1J9Zzojjd X-Received: by 2002:a37:4990:: with SMTP id w138mr3289951qka.198.1572014516667; Fri, 25 Oct 2019 07:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572014516; cv=none; d=google.com; s=arc-20160816; b=MNZbLS30QStdSt2tlJUvA7/2WfU3DROZ+wQPOXvoduL8K/Rg/caEBAvyF8Y26d4VBh D+yb8iKHqAj16h246pS3h4rh8jSl5V273aq9g/L0wA/0QFmPhhGIa7ZGnnUbq3P/BCe5 sec+1T4ktwcxJyXMoYWzxa8vlfPWUD/iNnywypaDV7a9xTTiYzXTGtWibDJTjn1SXXk5 nX9i9uTY2F1xpUxczkCaaaN4fWIHSYUJ0x4V0YX5Slbt2H31xfWgvnBC9f9UT/wgn2Mc reLi0g92WlMh7Iqs2+zimv3WsonjvlhoOmC5iTAnaL5s5w7gJmmb97APSDs1xCZDP4cO 75hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=YCOFi2fDpbUezaVnqe2fyjA9hZ1F82Ek3+HEANsqQro=; b=EytMt31OiDzJqiAxiPFT8wBDG4GgAY3RBWsmsGYcfHMa1rnUdAPgViqTICGTRPjtMp 3sKtIDMidU9K7QiP/493gpdtqZ5UV5k5MDs2whH8AvbxiJ7hUFjll0flm3HdlAbDJs8T 90HGNBi0HaqCZ+z+PPB9pzWIDSkhldlcFWnT0RqdKyqEd6vxuPa5nFyChzidAHYw61lG JLqR4yOF+5Rg5Y8Cehz47hLHNSOoOwu+4CzffUGvW1ZgbRlZc5w6fd7YZFICwlST28aX 2rB2FKRpgXc8kep+CUN8H8YK/Df6kths7Pwes5kA8Y5VzKnKvVpEvGLpSY+y5G9RmzLk M7Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r3o1E+sJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i2si1590480qtd.197.2019.10.25.07.41.56 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Oct 2019 07:41:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r3o1E+sJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iO0mp-0005WM-NQ for patch@linaro.org; Fri, 25 Oct 2019 10:41:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44389) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iO0Tn-0005Co-Bk for qemu-devel@nongnu.org; Fri, 25 Oct 2019 10:22:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iO0Tm-0001g2-Aw for qemu-devel@nongnu.org; Fri, 25 Oct 2019 10:22:15 -0400 Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]:42375) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iO0Tm-0001fp-7G for qemu-devel@nongnu.org; Fri, 25 Oct 2019 10:22:14 -0400 Received: by mail-qt1-x831.google.com with SMTP id w14so3451350qto.9 for ; Fri, 25 Oct 2019 07:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YCOFi2fDpbUezaVnqe2fyjA9hZ1F82Ek3+HEANsqQro=; b=r3o1E+sJZZ3s195dKunkrFvV0xCk+XH8nhfVpz7dAFaosR6a7pP10ak4h+gSL9SHNM xOJLhU+pCD8LZ6VvJMRMySKbN6XbaRI8e08hPP//g4gaHGS5jrkCpR9TX2DapPCb/kth QKJjvqbnRyh1ChIRsk6FYQLEDPBFkmbmq9M/CdWoI0F6Okjm/iQE6LnzT6xJ18wpUFVh qQ3DKY0HWy3ot4IvQoKMkK7ASwa927f7LmpuJ1ynKGfm3vnE6dzcEzo9BHg7oO+2TJL3 7jcFd4EfXHb/pWp7I7TohFfs6fsLN7ngvIGs9zEieW2HlUJ2VL60/mZ6hD65znf9uj4e xWsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YCOFi2fDpbUezaVnqe2fyjA9hZ1F82Ek3+HEANsqQro=; b=mmoeyvzhT5I2ucHfrWxQ58D98KSLmcqxggS35bunPGwG1aPdekD1BGLA6k8HVD/5hU gMu4ibgoN4U7xwLCsybfMW5Qe+nyOWNY+48+Ey9T5RsqAaTonDnV0KSOhcZ4iLs21ZL+ mY6hSxQ1figsi9nZsRFotJPp/AHpQcmU1BuPQPYmmliWWTVn3Zrv2rA2ywc0ZhCXo14+ Lt0EU6auoEW34wgRaM1+GU98whtUZv7xXVHPJ2aXVP53i3z98+R9gG6IsPGTB7Dg3bZZ donqrK1fhh8N8OLZePOnslvN/spVFUROdEjNEhSIHIvjvdqyxyHsukvQtfiPj1H09ui8 LUzg== X-Gm-Message-State: APjAAAXKhJ/QGNJqHRuNn789Faf3i4cBkIQrEZwD8zTkDEPVzGikyOQt 0JjtoWnvOUK1ofq0lu5k4934jEU+Er0= X-Received: by 2002:a05:6214:8c6:: with SMTP id da6mr2147206qvb.1.1572013333308; Fri, 25 Oct 2019 07:22:13 -0700 (PDT) Received: from localhost.localdomain (rrcs-172-254-253-50.nyc.biz.rr.com. [172.254.253.50]) by smtp.gmail.com with ESMTPSA id q17sm1137050qtq.58.2019.10.25.07.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 07:22:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 10/12] cputlb: Fix tlb_vaddr_to_host Date: Fri, 25 Oct 2019 10:21:57 -0400 Message-Id: <20191025142159.12459-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191025142159.12459-1-richard.henderson@linaro.org> References: <20191025142159.12459-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::831 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Using uintptr_t instead of target_ulong meant that, for 64-bit guest and 32-bit host, we truncated the guest address comparator and so may not hit the tlb when we should. Fixes: 4811e9095c0 Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 6f4194df96..5eebddcca8 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1189,7 +1189,7 @@ void *tlb_vaddr_to_host(CPUArchState *env, abi_ptr addr, MMUAccessType access_type, int mmu_idx) { CPUTLBEntry *entry = tlb_entry(env, mmu_idx, addr); - uintptr_t tlb_addr, page; + target_ulong tlb_addr, page; size_t elt_ofs; switch (access_type) {