From nobody Wed Apr 9 21:55:40 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1606131870; cv=none; d=zohomail.com; s=zohoarc; b=AF3WqeCIGk/O4IPBYDkrhqKBPOn23fqsvD9q8kFLa8ey48X/YWp4x/k+2ltFdgAybnhkGVHXexYcCcEkKgImnjjf54ujPmOI5VjizwMizy5R87FSq+FdnYsARq9o4ivf0+/hMZbYFNn3rlYLtrWSecRI/nG8eJRdMPjyPG4tj48= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606131870; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=60shXaWLqPtiw2PDg/2z7RXNgbXvTsuPrfA/VmL6lhA=; b=Ct/4DPRz5l5Ab/l0Gpswah1YEMUN3tF4ACg91BksHyjmHFSvtxv828f3nF66O4AX8Dje+IErUceezPEac1dw3EsbbXcj2cwbrvnIwR4P7rn6cF+nEo4dNZJKfuviwvRr71wB3VpQDBbgf26osUyhmQTUTzR8hZqLYr4ZTC8Xhro= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1606131870871832.5482831143854; Mon, 23 Nov 2020 03:44:30 -0800 (PST) Received: from localhost ([::1]:47446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khAGj-0005zJ-P6 for importer@patchew.org; Mon, 23 Nov 2020 06:44:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khAFh-0004Dx-LS for qemu-devel@nongnu.org; Mon, 23 Nov 2020 06:43:25 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:36103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khAFc-0002eQ-Ae for qemu-devel@nongnu.org; Mon, 23 Nov 2020 06:43:25 -0500 Received: by mail-wr1-x441.google.com with SMTP id z7so2449585wrn.3 for ; Mon, 23 Nov 2020 03:43:19 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id g186sm50836495wma.1.2020.11.23.03.43.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 03:43:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=60shXaWLqPtiw2PDg/2z7RXNgbXvTsuPrfA/VmL6lhA=; b=I7CbLDZ+B4mrKiI8Ld3AAJhjqj5NS3nX4HomQd3RUZkcqbpYuqwHPJtVdVcyzKT3K9 w+jXIkE4QmeFM6YgrXhkKRMnwkL4C08QGt5OUgSFD+wc52SRT1vXl6s9zIOqI2sqEPP/ jzjOJFBezn4hPC1uxuLc0Ux2SJpv6CZrPnn4/ZqTTEF9A7dpYfm7qgn2LPwVAK/KjEXK khamHwqX9Hr/dvbo5xNHwlI7Xz69j3hSVjQvNNjetpfDiCmXgI1/NbNvTA0T/lwZJ4+v HDEtfAzphXvVRFLPEGnXVXy7jvKV5AUKRjjoBcAhvPL6Cb4jcOG/teJv7VUol6L9cjET rn/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=60shXaWLqPtiw2PDg/2z7RXNgbXvTsuPrfA/VmL6lhA=; b=TDIEbWRlDS5r6AW3nqF3BDWSLcwLUgE3I/YZRd6pVfw1ZBcaQ+C/+cYfEMyR8pX3o8 WCzLtMOIF1Jglx0Q/48L/xB5w1E4REq1EOSOt9pGHXzfBEoutv1CCH/dGUxL06cvCvDR tEZBDdRhFaF+lZUs0Ztn0Cv2WYG9foUJIcH67ldgL7er4U9D3v/PSHRSyJWrBdXe+NPQ EzFM6yxxPSJMCpBVuKMu+wgf6O6NttlWqcZv8wbbkbNtO3vofuLyvNLc0Rd7EyidnU3W 3IbBv1uopIxK9WDSRLF3qMVhPLOW6BrseHvb06HwTVpiIZj+kfA1Sfjl0wUTJKrMTA9v MlxQ== X-Gm-Message-State: AOAM533JMFliHxu6i/ES9sOQkwO4uvGeIDiwZ3KG7miX85Qphk8Lv/VH LReigUZZOTS8YxPp0PcK/LA8n7nTEJjtZQ== X-Google-Smtp-Source: ABdhPJz8LDSwXpEzj2g8vlsxwflishAiyFebFLJf5Vqhz7lvXCXOPK9bTRhPkPI+ka+dPIKSLfL0Sg== X-Received: by 2002:adf:de12:: with SMTP id b18mr31383111wrm.187.1606131798672; Mon, 23 Nov 2020 03:43:18 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/24] target/arm: fix stage 2 page-walks in 32-bit emulation Date: Mon, 23 Nov 2020 11:42:52 +0000 Message-Id: <20201123114315.13372-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201123114315.13372-1-peter.maydell@linaro.org> References: <20201123114315.13372-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x441.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: R=C3=A9mi Denis-Courmont Using a target unsigned long would limit the Input Address to a LPAE page-walk to 32 bits on AArch32 and 64 bits on AArch64. This is okay for stage 1 or on AArch64, but it is insufficient for stage 2 on AArch32. In that later case, the Input Address can have up to 40 bits. Signed-off-by: R=C3=A9mi Denis-Courmont Reviewed-by: Richard Henderson Message-id: 20201118150414.18360-1-remi@remlab.net Signed-off-by: Peter Maydell --- target/arm/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 11b0803df72..38cd35c0492 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -40,7 +40,7 @@ =20 #ifndef CONFIG_USER_ONLY =20 -static bool get_phys_addr_lpae(CPUARMState *env, target_ulong address, +static bool get_phys_addr_lpae(CPUARMState *env, uint64_t address, MMUAccessType access_type, ARMMMUIdx mmu_id= x, bool s1_is_el0, hwaddr *phys_ptr, MemTxAttrs *txattrs, int = *prot, @@ -10988,7 +10988,7 @@ static ARMVAParameters aa32_va_parameters(CPUARMSta= te *env, uint32_t va, * @fi: set to fault info if the translation fails * @cacheattrs: (if non-NULL) set to the cacheability/shareability attribu= tes */ -static bool get_phys_addr_lpae(CPUARMState *env, target_ulong address, +static bool get_phys_addr_lpae(CPUARMState *env, uint64_t address, MMUAccessType access_type, ARMMMUIdx mmu_id= x, bool s1_is_el0, hwaddr *phys_ptr, MemTxAttrs *txattrs, int = *prot, --=20 2.20.1