On 8/12/22 17:50, Furquan Shaikh wrote:
Why do you need such fine-grained control? What is the use-case?
I ran into a problem when I was testing a project (with a microkernel
in M-mode and tasks in U-mode) that uses semihosting for debugging.
The semihosting worked fine for M-mode but not in U-mode.
Sure. This would be handled by Peter's proposed userspace-enable=on property.
As I started
digging into this, I realized that this is because qemu restricts
semihosting to only M and S modes. From reading the debug spec, I
understood that the DCSR presents options for ebreak behavior in each
mode including VS and VU.
I strongly suspect that VS also already works, since that's just
env->priv == PRV_S && riscv_cpu_virt_enabled(env)
VU would also be handled by userspace-enable=on.
I do not see any use for 5 separate properties.
r~