qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 7/7] target/riscv: Honour -semihosting-config userspace=on


From: Richard Henderson
Subject: Re: [PATCH v2 7/7] target/riscv: Honour -semihosting-config userspace=on and enable=on
Date: Mon, 22 Aug 2022 09:11:07 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 8/22/22 07:12, Peter Maydell wrote:
The riscv target incorrectly enabled semihosting always, whether the
user asked for it or not.  Call semihosting_enabled() passing the
correct value to the is_userspace argument, which fixes this and also
handles the userspace=on argument.  Because we do this at translate
time, we no longer need to check the privilege level in
riscv_cpu_do_interrupt().

Note that this is a behaviour change: we used to default to
semihosting being enabled, and now the user must pass
"-semihosting-config enable=on" if they want it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
  target/riscv/cpu_helper.c                      | 9 +++------
  target/riscv/translate.c                       | 1 +
  target/riscv/insn_trans/trans_privileged.c.inc | 3 ++-
  3 files changed, 6 insertions(+), 7 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]