summary refs log tree commit diff stats
path: root/docs/system/device-url-syntax.rst.inc
diff options
context:
space:
mode:
authorLoïc Lefort <loic@rivosinc.com>2025-03-13 20:30:07 +0100
committerAlistair Francis <alistair.francis@wdc.com>2025-05-19 13:27:56 +1000
commit4541d205f03cf1529439f68d2ec5056685189399 (patch)
tree53fe566f7d36553ae5c3d4685aaf6bd5a8e0784e /docs/system/device-url-syntax.rst.inc
parentcd18dbbf9d23f309f3e46c38b99213dbe3d48d17 (diff)
downloadfocaccia-qemu-4541d205f03cf1529439f68d2ec5056685189399.tar.gz
focaccia-qemu-4541d205f03cf1529439f68d2ec5056685189399.zip
target/riscv: pmp: don't allow RLB to bypass rule privileges
When Smepmp is supported, mseccfg.RLB allows bypassing locks when writing CSRs
but should not affect interpretation of actual PMP rules.

This is not the case with the current implementation where pmp_hart_has_privs
calls pmp_is_locked which implements mseccfg.RLB bypass.

This commit implements the correct behavior by removing mseccfg.RLB bypass from
pmp_is_locked.

RLB bypass when writing CSRs is implemented by adding a new pmp_is_readonly
function that calls pmp_is_locked and check mseccfg.RLB. pmp_write_cfg and
pmpaddr_csr_write are changed to use this new function.

Signed-off-by: Loïc Lefort <loic@rivosinc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: LIU Zhiwei  <zhiwei_liu@linux.alibaba.com>
Message-ID: <20250313193011.720075-2-loic@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Cc: qemu-stable@nongnu.org
Diffstat (limited to 'docs/system/device-url-syntax.rst.inc')
0 files changed, 0 insertions, 0 deletions