From patchwork Mon Oct 28 14:59:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 177943 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp3187610ocf; Mon, 28 Oct 2019 08:14:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxg5I1JRfoQ8Yk9n+TXMd0kBsGeSi/ecHAAwTfBXgDfb6pO4ppDqi5PqCopd2apOkPYqfe4 X-Received: by 2002:ac8:768c:: with SMTP id g12mr7376722qtr.125.1572275668319; Mon, 28 Oct 2019 08:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572275668; cv=none; d=google.com; s=arc-20160816; b=eYmaNdE/K6ADAxVYCjtNMV9q2qx0B54UUxGOYxF1ZJPRtl1gQaPcN8xrZ751NaWk9V CDOcnxTmfqQA2qvEufN/S8MNGmKymCstbeDQRfXABu0+PYsYbOcVyhZMUfyANYPUjxYR /QFaQXh8NVSpMjKMkZqG/S6Tc4QJdq8v/c8bM8RVIvEMX8Pk9bPel9aCsSwpjojgwrDU 1VISFcDGUxY7z6anBaEHVj2cJhTDBWrjNblPY9ekqzbqssL5obDnFqW072e8LMUdKMp5 83M4p7C4LIwFNytDs3M6UE0TziCkAgSUlIoi+vy/dVK0GzoVJG4ep70YCovPNkeuojz0 tESw== 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=mbQgNbcqtgHp3M91xYWY4ySEVM23vU7zd6pctpeJP8bn3YOcCbMOPXIhQRkEgEID6b TgO3YOYcnoWLXjAOq+42bwBLk4kpvF0SdO1MCHlws0pdZ8V5aUJ17URxiWb55A5/AoyS 2Nm1N4CCarn4EkGfMTJvkWhbhDS8D9Dz6SwStNm8zGyW8hb/PKVocFLIPuijs+8AT88g gYQmXl+2n1ymaHXfMgW88PZA/TBpR7lheQtg2xSczRhWIlZGRVucZxQ1ct/VE2Z+PQLI lwkR0PB2tijnh5srZMLISDDwzdlmZtuObOjkb2wWbuQktL+QKh/GZegPw2mEQAShO3MY udug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j5DjlpNd; 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 f17si3737178qkh.91.2019.10.28.08.14.28 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Oct 2019 08:14:28 -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=j5DjlpNd; 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]:45996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iP6ix-0008Qg-81 for patch@linaro.org; Mon, 28 Oct 2019 11:14:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44653) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iP6Us-0007Zb-4k for qemu-devel@nongnu.org; Mon, 28 Oct 2019 10:59:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iP6Uq-00046F-OV for qemu-devel@nongnu.org; Mon, 28 Oct 2019 10:59:54 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:41737) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iP6Uq-00045Q-5K for qemu-devel@nongnu.org; Mon, 28 Oct 2019 10:59:52 -0400 Received: by mail-wr1-x42a.google.com with SMTP id p4so10232656wrm.8 for ; Mon, 28 Oct 2019 07:59:50 -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=j5DjlpNdbceAhWM3wA+cq5w2SimbXwmz2a4Sz50xmpRAd69drjUKuzN8RKlJ/WvyOC AQeaDLHij8e63cBnpiqO2cMOYXlJI2Goe3yP2jsr/GugX3SPH4OauXtg3PaWLbw/PwbR 3Xl56VmqGII+IXl6B3oT4hTpLSr2PLR1RC3byS/4RXuOnSXqkbZTQwxIWytLY2ygdPBV t+p0kMsN+o9RQbZu6PhmSVq4sld9QVYXGGtOH82CGq1D0LPZ+5kSq1oCZbiAQSX3/ivJ WwO1lFpGnll/OjXI+511EkkzIq273BDNagE2ZdIiaIH5K5mGImMw0WNGPmGsA0dngGMz xQQg== 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=T25vi5QatwNRI9Qm2VNAdsK8Awo/5S7fWE9Ah97y1wrkYEFyiugSCU3RkVd1uUvxOU j1XmzXC55p31jc8nnGct0iP6tWdAfCGhIWcSIoJUPolnh/i1D8auFxGy7swSNZrf0hyt dtf/FyNK4aMG1YvbDfODOCySOa+ITppE74/3B82SlAFP6ssKga7v9kL3mC6p9Xllnlip LkxH9NSLJTSvNVD5P9C0z9OW0bxStd04VFf6Afkhk0FnSc44Xo2sm8dQp0fdsmUu2XjM aKPYy6pTN7P/69uURqY6QeXuyTtPZPuqbc0VqClyh3eLytSTdEAGk37oWgSxM2akYGxU tnrQ== X-Gm-Message-State: APjAAAWNnPnqFnoP9QnGFNOUtK3H0AnVdsWrX5nuAcuqXFBox/jtHG8c kXs7vpHX+1EL2XB6ko2s8Hh7+ykE9p2OGg== X-Received: by 2002:adf:ee03:: with SMTP id y3mr15178137wrn.116.1572274789526; Mon, 28 Oct 2019 07:59:49 -0700 (PDT) Received: from localhost.localdomain (230.106.138.88.rev.sfr.net. [88.138.106.230]) by smtp.gmail.com with ESMTPSA id 143sm14842876wmb.33.2019.10.28.07.59.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2019 07:59:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL v2 10/12] cputlb: Fix tlb_vaddr_to_host Date: Mon, 28 Oct 2019 15:59:35 +0100 Message-Id: <20191028145937.10914-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191028145937.10914-1-richard.henderson@linaro.org> References: <20191028145937.10914-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42a 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) {