From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVNTv-0006Q1-3i for qemu-devel@nongnu.org; Tue, 10 Mar 2015 12:58:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVNTo-0008Gj-Cv for qemu-devel@nongnu.org; Tue, 10 Mar 2015 12:58:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVNTo-0008GG-6R for qemu-devel@nongnu.org; Tue, 10 Mar 2015 12:58:04 -0400 Date: Tue, 10 Mar 2015 17:57:56 +0100 From: Andrew Jones Message-ID: <20150310165756.GE6320@hawk.usersys.redhat.com> References: <1423753507-30542-1-git-send-email-drjones@redhat.com> <1423753507-30542-3-git-send-email-drjones@redhat.com> <20150310163233.GB6320@hawk.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 2/5] target-arm: enable get_rw_prot to take simple AP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers On Tue, Mar 10, 2015 at 04:41:45PM +0000, Peter Maydell wrote: > On 10 March 2015 at 16:32, Andrew Jones wrote: > > On Tue, Mar 10, 2015 at 03:22:55PM +0000, Peter Maydell wrote: > >> I'm confused. Even if we're using the simple-permissions > >> model, the ap parameter is still AP[2:0]. Shouldn't this > >> switch be for cases 0, 2, 4, 6 ? > > > > Depends on how we choose to implement the callers. Currently > > I only require the caller to send in 2 bits for the simple > > model. If we want to require them to send in 3, then we'll > > need to shift a zero in for the lpae caller, rather than > > shift a zero out for the v6 caller. > > You have to have the callers just pass in AP[2:0], unless > you want them to have to duplicate the "are we using the > simple permissions model?" condition to figure out whether > to shift the argument around, which doesn't seem very > sensible. > The v6 caller is the only one that could be either-or, and it already checked regime_sctlr(env, mmu_idx) & SCTLR_AFE, as it wanted to see if it cared about the access flag anyway. I suspect any new callers that could be either-or would do the same. drew