Re: [PATCH 2/2] target/riscv/cpu_helper.c: Fix mxr bit behavior

2023-11-20 Thread Daniel Henrique Barboza
On 11/20/23 09:06, Ivan Klokov wrote: According to RISCV Specification sect 9.5 on two stage translation when V=1 the vsstatus(mstatus in QEMU's terms) field MXR, which makes execute-only pages readable, only overrides VS-stage page protection. Setting MXR at HS-level(mstatus_hs), however, ove

[PATCH 2/2] target/riscv/cpu_helper.c: Fix mxr bit behavior

2023-11-20 Thread Ivan Klokov
According to RISCV Specification sect 9.5 on two stage translation when V=1 the vsstatus(mstatus in QEMU's terms) field MXR, which makes execute-only pages readable, only overrides VS-stage page protection. Setting MXR at HS-level(mstatus_hs), however, overrides both VS-stage and G-stage execute-on