[PATCH] target/riscv: Fix mret exception cause when no pmp rule is configured

2022-12-04 Thread Bin Meng
The priv spec v1.12 says: If no PMP entry matches an M-mode access, the access succeeds. If no PMP entry matches an S-mode or U-mode access, but at least one PMP entry is implemented, the access fails. Failed accesses generate an instruction, load, or store access-fault exception. At pres

Re: [PATCH] target/riscv: Fix mret exception cause when no pmp rule is configured

2022-12-05 Thread Wilfred Mallawa
On Mon, 2022-12-05 at 14:53 +0800, Bin Meng wrote: > The priv spec v1.12 says: > >   If no PMP entry matches an M-mode access, the access succeeds. If >   no PMP entry matches an S-mode or U-mode access, but at least one >   PMP entry is implemented, the access fails. Failed accesses > generate >

Re: [PATCH] target/riscv: Fix mret exception cause when no pmp rule is configured

2022-12-05 Thread Alistair Francis
On Mon, Dec 5, 2022 at 4:54 PM Bin Meng wrote: > > The priv spec v1.12 says: > > If no PMP entry matches an M-mode access, the access succeeds. If > no PMP entry matches an S-mode or U-mode access, but at least one > PMP entry is implemented, the access fails. Failed accesses generate > an

Re: [PATCH] target/riscv: Fix mret exception cause when no pmp rule is configured

2022-12-06 Thread Alistair Francis
On Mon, Dec 5, 2022 at 4:54 PM Bin Meng wrote: > > The priv spec v1.12 says: > > If no PMP entry matches an M-mode access, the access succeeds. If > no PMP entry matches an S-mode or U-mode access, but at least one > PMP entry is implemented, the access fails. Failed accesses generate > an