aboutsummaryrefslogtreecommitdiff
path: root/rust/qemu-api-macros/src
diff options
context:
space:
mode:
authorDeepak Gupta <debug@rivosinc.com>2024-10-08 15:49:51 -0700
committerAlistair Francis <alistair.francis@wdc.com>2024-10-30 11:22:08 +1000
commitf9158a92404b9aec29f36ad1139b92f493d56604 (patch)
tree9d3c0643f7c657ab2ba0216951ae25d4e82ec1d1 /rust/qemu-api-macros/src
parent53c1557b230986ab6320a58e1b2c26216ecd86d5 (diff)
downloadqemu-f9158a92404b9aec29f36ad1139b92f493d56604.zip
qemu-f9158a92404b9aec29f36ad1139b92f493d56604.tar.gz
qemu-f9158a92404b9aec29f36ad1139b92f493d56604.tar.bz2
target/riscv: expose *envcfg csr and priv to qemu-user as well
Execution environment config CSR controlling user env and current privilege state shouldn't be limited to qemu-system only. *envcfg CSRs control enabling of features in next lesser mode. In some cases bits *envcfg CSR can be lit up by kernel as part of kernel policy or software (user app) can choose to opt-in by issuing a system call (e.g. prctl). In case of qemu-user, it should be no different because qemu is providing underlying execution environment facility and thus either should provide some default value in *envcfg CSRs or react to system calls (prctls) initiated from application. priv is set to PRV_U and menvcfg/senvcfg set to 0 for qemu-user on reest. `henvcfg` has been left for qemu-system only because it is not expected that someone will use qemu-user where application is expected to have hypervisor underneath which is controlling its execution environment. If such a need arises then `henvcfg` could be exposed as well. Relevant discussion: https://lore.kernel.org/all/CAKmqyKOTVWPFep2msTQVdUmJErkH+bqCcKEQ4hAnyDFPdWKe0Q@mail.gmail.com/ Signed-off-by: Deepak Gupta <debug@rivosinc.com> Suggested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20241008225010.1861630-2-debug@rivosinc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'rust/qemu-api-macros/src')
0 files changed, 0 insertions, 0 deletions