On Tue, Mar 10, 2015 at 04:41:45PM +0000, Peter Maydell wrote: > On 10 March 2015 at 16:32, Andrew Jones <drjo...@redhat.com> 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