Re: [Qemu-devel] [PATCH for-3.0] target/arm: Correctly handle overlapping small MPU regions

2018-07-19 Thread Peter Maydell
On 18 July 2018 at 05:02, Richard Henderson wrote: > On 07/17/2018 12:40 PM, Peter Maydell wrote: >> On 17 July 2018 at 18:29, Richard Henderson >> wrote: >>> I don't understand why this is necessary in the v8m case. >>> >>>AP APL >>>

Re: [Qemu-devel] [PATCH for-3.0] target/arm: Correctly handle overlapping small MPU regions

2018-07-17 Thread Richard Henderson
On 07/17/2018 12:40 PM, Peter Maydell wrote: > On 17 July 2018 at 18:29, Richard Henderson > wrote: >> I don't understand why this is necessary in the v8m case. >> >>AP APL >> >> >> >> Your comment posits two regions [B1,

Re: [Qemu-devel] [PATCH for-3.0] target/arm: Correctly handle overlapping small MPU regions

2018-07-17 Thread Peter Maydell
On 17 July 2018 at 18:29, Richard Henderson wrote: > I don't understand why this is necessary in the v8m case. > >AP APL > > > > Your comment posits two regions [B1,L1] and [B2,L2], that A is not within > [B1,L1] but is w

Re: [Qemu-devel] [PATCH for-3.0] target/arm: Correctly handle overlapping small MPU regions

2018-07-17 Thread Richard Henderson
On 07/16/2018 06:33 AM, Peter Maydell wrote: > @@ -9963,6 +9994,21 @@ static bool pmsav8_mpu_lookup(CPUARMState *env, > uint32_t address, > } > > if (address < base || address > limit) {> +/*> + > * Address not in this region. We must ch

[Qemu-devel] [PATCH for-3.0] target/arm: Correctly handle overlapping small MPU regions

2018-07-16 Thread Peter Maydell
To correctly handle small (less than TARGET_PAGE_SIZE) MPU regions, we must correctly handle the case where the address being looked up hits in an MPU region that is not small but the address is in the same page as a small region. For instance if MPU region 1 covers an entire page from 0x2000 to 0x