Message ID | 20250130182309.717346-5-peter.maydell@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | target/arm: Clean up some corner cases of sysreg traps | expand |
Peter Maydell <peter.maydell@linaro.org> writes: > The pseudocode for the accessors for the LOR sysregs says they > are UNDEFINED if SCR_EL3.NS is 0. We were reporting the wrong > syndrome value here; use CP_ACCESS_TRAP_UNCATEGORIZED. > > Cc: qemu-stable@nongnu.org > Fixes: 2d7137c10faf ("target/arm: Implement the ARMv8.1-LOR extension") > Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
On 1/30/25 10:22, Peter Maydell wrote: > The pseudocode for the accessors for the LOR sysregs says they > are UNDEFINED if SCR_EL3.NS is 0. We were reporting the wrong > syndrome value here; use CP_ACCESS_TRAP_UNCATEGORIZED. > > Cc:qemu-stable@nongnu.org > Fixes: 2d7137c10faf ("target/arm: Implement the ARMv8.1-LOR extension") > Signed-off-by: Peter Maydell<peter.maydell@linaro.org> > --- > target/arm/helper.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
diff --git a/target/arm/helper.c b/target/arm/helper.c index 74b556b6766..5d9eca35c04 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6750,8 +6750,8 @@ static CPAccessResult access_lor_other(CPUARMState *env, const ARMCPRegInfo *ri, bool isread) { if (arm_is_secure_below_el3(env)) { - /* Access denied in secure mode. */ - return CP_ACCESS_TRAP; + /* UNDEF if SCR_EL3.NS == 0 */ + return CP_ACCESS_TRAP_UNCATEGORIZED; } return access_lor_ns(env, ri, isread); }
The pseudocode for the accessors for the LOR sysregs says they are UNDEFINED if SCR_EL3.NS is 0. We were reporting the wrong syndrome value here; use CP_ACCESS_TRAP_UNCATEGORIZED. Cc: qemu-stable@nongnu.org Fixes: 2d7137c10faf ("target/arm: Implement the ARMv8.1-LOR extension") Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- target/arm/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)