Re: [PATCH 01/11] riscv: Add privilege level to DisasContext

2022-09-15 Thread LIU Zhiwei
On 2022/9/16 14:00, Richard Henderson wrote: On 9/6/22 14:22, Christoph Muellner wrote: From: Christoph Müllner This allows privileged instructions to check the required privilege level in the translation without calling a helper. Signed-off-by: Christoph Müllner ---   target/riscv/transla

Re: [PATCH 01/11] riscv: Add privilege level to DisasContext

2022-09-15 Thread Richard Henderson
On 9/16/22 08:00, Richard Henderson wrote: Or, keep the field, because it's usage will be more self-documentary, but copy the value from ctx->mmu_idx and add a comment. Or, add an inline function like static inline int priv_level(DisasContext *ctx) { #ifdef CONFIG_USER_ONLY return PRV_U; #

Re: [PATCH 01/11] riscv: Add privilege level to DisasContext

2022-09-15 Thread Richard Henderson
On 9/6/22 14:22, Christoph Muellner wrote: From: Christoph Müllner This allows privileged instructions to check the required privilege level in the translation without calling a helper. Signed-off-by: Christoph Müllner --- target/riscv/translate.c | 4 1 file changed, 4 insertions(+)

Re: [PATCH 01/11] riscv: Add privilege level to DisasContext

2022-09-15 Thread LIU Zhiwei
Reviewed-by: LIU Zhiwei Zhiwei On 2022/9/6 20:22, Christoph Muellner wrote: From: Christoph Müllner This allows privileged instructions to check the required privilege level in the translation without calling a helper. Signed-off-by: Christoph Müllner --- target/riscv/translate.c | 4 +++

[PATCH 01/11] riscv: Add privilege level to DisasContext

2022-09-06 Thread Christoph Muellner
From: Christoph Müllner This allows privileged instructions to check the required privilege level in the translation without calling a helper. Signed-off-by: Christoph Müllner --- target/riscv/translate.c | 4 1 file changed, 4 insertions(+) diff --git a/target/riscv/translate.c b/target