Re: [PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-06-03 Thread Weiwei Li
On 2023/6/3 05:01, Richard Henderson wrote: On 6/1/23 18:31, Weiwei Li wrote: Even though MPRV normally can be set to 1 in M mode, it seems possible to set it to 1 in other mode by gdbstub. That would seem to be a gdbstub bug, since it is cleared on exit from M-mode, and cannot be set again

Re: [PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-06-02 Thread Richard Henderson
On 6/1/23 18:31, Weiwei Li wrote: Even though MPRV normally can be set to 1 in M mode, it seems possible to set it to 1 in other mode by gdbstub. That would seem to be a gdbstub bug, since it is cleared on exit from M-mode, and cannot be set again until we re-enter M-mode. r~

Re: [PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-06-01 Thread Weiwei Li
On 2023/6/2 07:03, Alistair Francis wrote: On Thu, Jun 1, 2023 at 4:43 PM Weiwei Li wrote: On 2023/6/1 13:27, Alistair Francis wrote: On Mon, May 29, 2023 at 10:19 PM Weiwei Li wrote: Normally, MPRV can be set to 1 only in M mode (It will be cleared when returning to lower-privilege mode

Re: [PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-06-01 Thread Alistair Francis
On Thu, Jun 1, 2023 at 4:43 PM Weiwei Li wrote: > > > On 2023/6/1 13:27, Alistair Francis wrote: > > On Mon, May 29, 2023 at 10:19 PM Weiwei Li wrote: > >> Normally, MPRV can be set to 1 only in M mode (It will be cleared > >> when returning to lower-privilege mode by MRET/SRET). > >> > >> Signed

Re: [PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-05-31 Thread Weiwei Li
On 2023/6/1 13:27, Alistair Francis wrote: On Mon, May 29, 2023 at 10:19 PM Weiwei Li wrote: Normally, MPRV can be set to 1 only in M mode (It will be cleared when returning to lower-privilege mode by MRET/SRET). Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_

Re: [PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-05-31 Thread Alistair Francis
On Mon, May 29, 2023 at 10:19 PM Weiwei Li wrote: > > Normally, MPRV can be set to 1 only in M mode (It will be cleared > when returning to lower-privilege mode by MRET/SRET). > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > --- > target/riscv/cpu_helper.c | 2 +- > 1 file changed,

Re: [PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-05-31 Thread Daniel Henrique Barboza
On 5/29/23 09:17, Weiwei Li wrote: Normally, MPRV can be set to 1 only in M mode (It will be cleared when returning to lower-privilege mode by MRET/SRET). Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- Reviewed-by: Daniel Henrique Barboza target/riscv/cpu_helper.c | 2 +-

Re: [PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-05-30 Thread Daniel Henrique Barboza
On 5/29/23 09:17, Weiwei Li wrote: Normally, MPRV can be set to 1 only in M mode (It will be cleared when returning to lower-privilege mode by MRET/SRET). Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-05-29 Thread Weiwei Li
Normally, MPRV can be set to 1 only in M mode (It will be cleared when returning to lower-privilege mode by MRET/SRET). Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu_helper