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:
Edgar E. Iglesias 2020-08-17 19:07:19 +02:00
parent d449561b13
commit b4919e7dd3

View File

@ -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)