From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTwpR-0001Nq-LA for qemu-devel@nongnu.org; Thu, 11 Feb 2016 14:23:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTwpQ-0006WZ-Ne for qemu-devel@nongnu.org; Thu, 11 Feb 2016 14:23:01 -0500 From: Peter Maydell Date: Thu, 11 Feb 2016 19:11:45 +0000 Message-Id: <1455217909-28317-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 0/4] target-arm: Clean up trap/undef handling of SRS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Sergey Fedorov , qemu-arm@nongnu.org, patches@linaro.org The SRS instruction is a bit of an oddity because it isn't used by Linux these days. Nonetheless it has a bunch of UNPREDICTABLE, UNDEF and trapping behaviour that we weren't correctly implementing: - trap to EL3 if EL3 is AArch64 and we are at Secure EL1 - UNDEFINED in Hyp mode - UNPREDICTABLE in User or System mode - UNPREDICTABLE if the specified mode is: -- not implemented -- not a valid mode number -- a mode that's at a higher exception level -- Monitor, if we are Non-secure This series implements the checks we were missing and makes us UNDEF for all the UNPREDICTABLE cases. Patch 1 does the easy checks that can be done at translate time; patches 2 and 3 are code motion in preparation for patch 4, which puts in a run-time check for the one awkward case we don't have enough information to UNDEF at translate time. thanks -- PMM Peter Maydell (4): target-arm: Clean up trap/undef handling of SRS target-arm: Move get/set_r13_banked() to op_helper.c target-arm: Combine user-only and softmmu get/set_r13_banked() target-arm: UNDEF in the UNPREDICTABLE SRS-from-System case target-arm/helper.c | 33 ------------------------- target-arm/op_helper.c | 32 ++++++++++++++++++++++++ target-arm/translate.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 94 insertions(+), 38 deletions(-) -- 1.9.1