Re: [PATCH 2/2] target/riscv: Legalize MPP value in write_mstatus

2023-04-05 Thread liweiwei
On 2023/4/6 09:26, Alistair Francis wrote: On Thu, Mar 30, 2023 at 11:59 PM Weiwei Li wrote: mstatus.MPP field is a WARL field, so we remain it unchanged if an Only since version 1.11 of the priv spec and we do still support priv 1.10. I think it's ok to make this change for all priv versio

Re: [PATCH 2/2] target/riscv: Legalize MPP value in write_mstatus

2023-04-05 Thread Alistair Francis
On Thu, Mar 30, 2023 at 11:59 PM Weiwei Li wrote: > > mstatus.MPP field is a WARL field, so we remain it unchanged if an Only since version 1.11 of the priv spec and we do still support priv 1.10. I think it's ok to make this change for all priv versions, as it won't break any software running 1

[PATCH 2/2] target/riscv: Legalize MPP value in write_mstatus

2023-03-30 Thread Weiwei Li
mstatus.MPP field is a WARL field, so we remain it unchanged if an invalid value is written into it. And after this, RVH shouldn't be passed to riscv_cpu_set_mode(). Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 5 + target/riscv/csr.c| 14 ++