From nobody Wed Apr 16 13:37:42 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 15342722202371.2938233207054282; Tue, 14 Aug 2018 11:43:40 -0700 (PDT) Received: from localhost ([::1]:45724 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpeI3-0007XE-M2 for importer@patchew.org; Tue, 14 Aug 2018 14:43:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpdv1-0004YY-NC for qemu-devel@nongnu.org; Tue, 14 Aug 2018 14:21:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fpdtn-0006aJ-Ft for qemu-devel@nongnu.org; Tue, 14 Aug 2018 14:19:47 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:44406) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fpdtm-0006ZX-Sg for qemu-devel@nongnu.org; Tue, 14 Aug 2018 14:18:31 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fpdtl-0007BQ-HE for qemu-devel@nongnu.org; Tue, 14 Aug 2018 19:18:29 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 14 Aug 2018 19:17:40 +0100 Message-Id: <20180814181815.23348-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180814181815.23348-1-peter.maydell@linaro.org> References: <20180814181815.23348-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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] [PULL 10/45] target/arm: Allow execution from small 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Now that we have full support for small regions, including execution, we can remove the workarounds where we marked all small regions as non-executable for the M-profile MPU and SAU. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: C=C3=A9dric Le Goater Tested-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20180710160013.26559-7-peter.maydell@linaro.org --- target/arm/helper.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 63a70065617..02c1c4d8404 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -9795,17 +9795,6 @@ static bool get_phys_addr_pmsav7(CPUARMState *env, u= int32_t address, =20 fi->type =3D ARMFault_Permission; fi->level =3D 1; - /* - * Core QEMU code can't handle execution from small pages yet, so - * don't try it. This way we'll get an MPU exception, rather than - * eventually causing QEMU to exit in get_page_addr_code(). - */ - if (*page_size < TARGET_PAGE_SIZE && (*prot & PAGE_EXEC)) { - qemu_log_mask(LOG_UNIMP, - "MPU: No support for execution from regions " - "smaller than 1K\n"); - *prot &=3D ~PAGE_EXEC; - } return !(*prot & (1 << access_type)); } =20 @@ -10056,18 +10045,6 @@ static bool pmsav8_mpu_lookup(CPUARMState *env, ui= nt32_t address, =20 fi->type =3D ARMFault_Permission; fi->level =3D 1; - /* - * Core QEMU code can't handle execution from small pages yet, so - * don't try it. This means any attempted execution will generate - * an MPU exception, rather than eventually causing QEMU to exit in - * get_page_addr_code(). - */ - if (*is_subpage && (*prot & PAGE_EXEC)) { - qemu_log_mask(LOG_UNIMP, - "MPU: No support for execution from regions " - "smaller than 1K\n"); - *prot &=3D ~PAGE_EXEC; - } return !(*prot & (1 << access_type)); } =20 --=20 2.18.0