Re: [PATCH v1 1/8] target/riscv: Fix the PMP is locked check when using TOR

2021-04-08 Thread Bin Meng
On Fri, Apr 2, 2021 at 8:49 PM Alistair Francis wrote: > > The RISC-V spec says: > if PMP entry i is locked and pmpicfg.A is set to TOR, writes to > pmpaddri-1 are ignored. > > The current QEMU code ignores accesses to pmpaddri-1 and pmpcfgi-1 which > is incorrect. > > Update the pmp_is_lo

[PATCH v1 1/8] target/riscv: Fix the PMP is locked check when using TOR

2021-04-02 Thread Alistair Francis
The RISC-V spec says: if PMP entry i is locked and pmpicfg.A is set to TOR, writes to pmpaddri-1 are ignored. The current QEMU code ignores accesses to pmpaddri-1 and pmpcfgi-1 which is incorrect. Update the pmp_is_locked() function to not check the suppording fields and instaed enforce t