target/microblaze: mbar: Trap sleeps from user-space
cover target/microblaze: mbar: Trap sleeps from user-space
From: "Edgar E. Iglesias" <[email protected]>
As suggested by Richard, trap mbar/sleeps from user-space.
Cheers,
Edgar
Edgar E. Iglesias (1):
target/microblaze: mbar: Trap sleeps from user-space
target/microblaze/translate.c | 5 +++++ 1 file changed, 5 insertions(+)
Signature · 1 line
2.25.1
PATCH 1/1 target/microblaze: mbar: Trap sleeps from user-space
From: "Edgar E. Iglesias" <[email protected]>
Trap mbar-sleeps from user-space.
Reported-by Richard Henderson <[email protected]>
Signed-off-by Edgar E. Iglesias <[email protected]>
--- target/microblaze/translate.c | 5 +++++ 1 file changed, 5 insertions(+)
target/microblaze/translate.c +5 -0
@@ -1250,6 +1250,11 @@ static void dec_br(DisasContext *dc)LOG_DIS ("sleep\n" ); +if (trap_userspace (dc, true)) { +/* Sleep is a privileged instruction. */ +return ; + } +t_sync_flags (dc);tcg_gen_st_i32 (tmp_1, cpu_env, -offsetof(MicroBlazeCPU, env)
Signature · 1 line
2.25.1
Quoted 9 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
Trap mbar-sleeps from user-space.
Reported-by Richard Henderson <[email protected]>Signed-off-by Edgar E. Iglesias <[email protected]>--- target/microblaze/translate.c | 5 +++++ 1 file changed, 5 insertions(+)
Reviewed-by Richard Henderson <[email protected]>
r~