target/microblaze: mbar: Trap sleeps from user-space
Trap mbar-sleeps from user-space. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reported-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
This commit is contained in:
parent
d449561b13
commit
b4919e7dd3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user