]> git.proxmox.com Git - mirror_qemu.git/commit
target/arm/ptw: Set s1ns bit in fault info more consistently
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 22 Aug 2023 16:31:05 +0000 (17:31 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 22 Aug 2023 16:31:05 +0000 (17:31 +0100)
commit4f51edd3cd1746c0eee66eebafdfb642f8dd7e87
tree5c323500d24c9ab80e76d46642c46f1ebb428179
parentf6415660746fcf58d6baf8dd8da77cb08adb9970
target/arm/ptw: Set s1ns bit in fault info more consistently

The s1ns bit in ARMMMUFaultInfo is documented as "true if
we faulted on a non-secure IPA while in secure state". Both the
places which look at this bit only do so after having confirmed
that this is a stage 2 fault and we're dealing with Secure EL2,
which leaves the ptw.c code free to set the bit to any random
value in the other cases.

Instead of taking advantage of that freedom, consistently
make the bit be set to false for the "not a stage 2 fault
for Secure EL2" cases. This removes some cases where we
were using an 'is_secure' boolean and leaving the reader
guessing about whether that was the right thing for Realm
and Root cases.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230807141514.19075-4-peter.maydell@linaro.org
target/arm/ptw.c