Received: from eggs.gnu.org ([2001:4830:134:3::10]:57371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcvRf-0005LJ-G1 for qemu-devel@nongnu.org; Tue, 10 Jul 2018 12:24:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcvRe-0006YN-MW for qemu-devel@nongnu.org; Tue, 10 Jul 2018 12:24:55 -0400 From: Peter Maydell Date: Tue, 10 Jul 2018 17:00:13 +0100 Message-Id: <20180710160013.26559-7-peter.maydell@linaro.org> In-Reply-To: <20180710160013.26559-1-peter.maydell@linaro.org> References: <20180710160013.26559-1-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 6/6] target/arm: Allow execution from small regions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: patches@linaro.org, Richard Henderson , "Emilio G . Cota" , Paolo Bonzini , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , "Edgar E. Iglesias" , KONRAD Frederic 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 --- target/arm/helper.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index a2ac96084e7..ed96e6c02fb 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -9784,17 +9784,6 @@ static bool get_phys_addr_pmsav7(CPUARMState *env, uint32_t address, fi->type = ARMFault_Permission; fi->level = 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 &= ~PAGE_EXEC; - } return !(*prot & (1 << access_type)); } @@ -10014,18 +10003,6 @@ static bool pmsav8_mpu_lookup(CPUARMState *env, uint32_t address, fi->type = ARMFault_Permission; fi->level = 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 &= ~PAGE_EXEC; - } return !(*prot & (1 << access_type)); } -- 2.17.1