From nobody Thu Nov 6 12:14:37 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 15415223666621008.9309811052104; Tue, 6 Nov 2018 08:39:26 -0800 (PST) Received: from localhost ([::1]:41997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gK4Nm-0006Dw-62 for importer@patchew.org; Tue, 06 Nov 2018 11:39:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gK4Mq-0005s7-2O for qemu-devel@nongnu.org; Tue, 06 Nov 2018 11:38:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gK4Mo-0004bj-3X for qemu-devel@nongnu.org; Tue, 06 Nov 2018 11:38:15 -0500 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:52390) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gK4Mg-0004V2-36; Tue, 06 Nov 2018 11:38:06 -0500 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1gK4Md-000842-Kl; Tue, 06 Nov 2018 16:38:03 +0000 From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Tue, 6 Nov 2018 16:38:01 +0000 Message-Id: <20181106163801.14474-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH for-3.1] target/arm: Remove workaround for small SAU regions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Before we supported direct execution from MMIO regions, we implemented workarounds in commit 720424359917887c926a33d2 which let us avoid doing so, even if the SAU or MPU region was less than page-sized. Once we implemented execute-from-MMIO, we removed part of those workarounds in commit d4b6275df320cee76; but we forgot the one in get_phys_addr_pmsav8() which suppressed use of small SAU regions in executable regions. Remove that workaround now. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/helper.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 96301930cc8..ec56becc394 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -10560,18 +10560,6 @@ static bool get_phys_addr_pmsav8(CPUARMState *env,= uint32_t address, =20 ret =3D pmsav8_mpu_lookup(env, address, access_type, mmu_idx, phys_ptr, txattrs, prot, &mpu_is_subpage, fi, NULL); - /* - * TODO: this is a temporary hack to ignore the fact that the SAU regi= on - * is smaller than a page if this is an executable region. We never - * supported small MPU regions, but we did (accidentally) allow small - * SAU regions, and if we now made small SAU regions not be executable - * then this would break previously working guest code. We can't - * remove this until/unless we implement support for execution from - * small regions. - */ - if (*prot & PAGE_EXEC) { - sattrs.subpage =3D false; - } *page_size =3D sattrs.subpage || mpu_is_subpage ? 1 : TARGET_PAGE_SIZE; return ret; } --=20 2.19.1