From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYD7Z-0007e6-6r for qemu-devel@nongnu.org; Sat, 05 Sep 2015 09:03:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYD7U-0005P1-DK for qemu-devel@nongnu.org; Sat, 05 Sep 2015 09:03:05 -0400 Received: from mail-vk0-f52.google.com ([209.85.213.52]:34952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYD7U-0005On-A0 for qemu-devel@nongnu.org; Sat, 05 Sep 2015 09:03:00 -0400 Received: by vkaw128 with SMTP id w128so24283722vka.2 for ; Sat, 05 Sep 2015 06:02:58 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <55EAD1F8.60107@virgin.net> References: <1441272453-23964-1-git-send-email-user@mike-desktop> <55EAD1F8.60107@virgin.net> From: Peter Maydell Date: Sat, 5 Sep 2015 14:02:39 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] ARM targets: added ARM_FEATURE for Thumb-exception bit in system control register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mike Haben Cc: QEMU Developers On 5 September 2015 at 12:28, Mike Haben wrote: > Most ARM cores switch unconditionally to ARM mode when an exception occurs; > some Cortex variants have a "Thumb-exception enable" bit in the system > control register that allows an unconditional switch to Thumb mode instead > when handling exceptions. The presence of this bit seems unrelated to the > version of instruction set, and some earlier cores use the same bit (30) in > the control register for a completely different purpose, so seems sensible > to handle it as yet another ARM feature. I think that SCTLR.TE is an ARMv7 feature -- it is documented in the v7 ARM ARM, and in the v6 ARM ARM the bit is UNP/SBZP. And the CPUs you've set your new feature bit on in this patch are exactly the v7 CPUs. So I think that we should just change the existing guard (which requires FEATURE_V4T) to require FEATURE_V7 instead). You're right that we need to specifically squash env->thumb to false in the no-feature-present case, though. thanks -- PMM