Re: [PATCH] target/riscv: Smepmp: Return error when access permission not allowed in PMP

2023-06-05 Thread Richard Henderson
On 6/5/23 00:51, Himanshu Chauhan wrote: +ret = ((privs & *allowed_privs) == privs ? true : false); Never convert bool to bool in this way. r~

Re: [PATCH] target/riscv: Smepmp: Return error when access permission not allowed in PMP

2023-06-05 Thread Weiwei Li
On 2023/6/5 15:51, Himanshu Chauhan wrote: On an address match, skip checking for default permissions and return error based on access defined in PMP configuration. Fixes: 90b1fafce06 ("target/riscv: Smepmp: Skip applying default rules when address matches") Signed-off-by: Himanshu Chauhan -

[PATCH] target/riscv: Smepmp: Return error when access permission not allowed in PMP

2023-06-05 Thread Himanshu Chauhan
On an address match, skip checking for default permissions and return error based on access defined in PMP configuration. Fixes: 90b1fafce06 ("target/riscv: Smepmp: Skip applying default rules when address matches") Signed-off-by: Himanshu Chauhan --- target/riscv/pmp.c | 5 +++-- 1 file change