On 8 May 2012 06:57, Rusty Russell <rusty.russ...@linaro.org> wrote: > (Accidentally made first reply to Peter only, fixed that now). > > On Mon, 7 May 2012 13:25:07 +0100, Peter Maydell <peter.mayd...@linaro.org> > wrote: >> On 7 May 2012 08:23, Rusty Russell <ru...@rustcorp.com.au> wrote: >> > OK, I reviewed the infrastructure, and it looks excellent. A few of >> > minor quibbles, which I only mention to show that I read it :) >> > >> > 1) cptype_valid, arm_current_pl and encoded_cp_matches_type could return >> > bool. >> > >> > 2) the access bits could be an enum type, which could be used in the >> > few places they're handled, for a bit more explicitness.
So, I'm fixing cptype_valid to return bool, and encoded_cp_matches_type is actually never used so I'm just deleting it. However arm_current_pl() returns an integer 0..3 (although at the moment QEMU doesn't implement PL2/PL3) and the access bits really are bits (cf how we implement cp_access_ok()) so I think I'd rather not use an enum there. cp_access_ok() also can return bool. -- PMM