diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2023-07-17 11:05:08 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2023-07-17 11:05:08 +0100 |
commit | 3f74da440ddad65dee5a22d63b2048a5ee16a5e2 (patch) | |
tree | 06fabd8a995b5121f2f9ad5efa4bcf8e998c3fa8 /util/oslib-posix.c | |
parent | 34eed551273cb42dbbff4d8fceb7b3576436aff3 (diff) | |
download | qemu-3f74da440ddad65dee5a22d63b2048a5ee16a5e2.zip qemu-3f74da440ddad65dee5a22d63b2048a5ee16a5e2.tar.gz qemu-3f74da440ddad65dee5a22d63b2048a5ee16a5e2.tar.bz2 |
target/arm: Fix S1_ptw_translate() debug path
In commit fe4a5472ccd6 we rearranged the logic in S1_ptw_translate()
so that the debug-access "call get_phys_addr_*" codepath is used both
when S1 is doing ptw reads from stage 2 and when it is doing ptw
reads from physical memory. However, we didn't update the
calculation of s2ptw->in_space and s2ptw->in_secure to account for
the "ptw reads from physical memory" case. This meant that debug
accesses when in Secure state broke.
Create a new function S2_security_space() which returns the
correct security space to use for the ptw load, and use it to
determine the correct .in_secure and .in_space fields for the
stage 2 lookup for the ptw load.
Reported-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230710152130.3928330-3-peter.maydell@linaro.org
Fixes: fe4a5472ccd6 ("target/arm: Use get_phys_addr_with_struct in S1_ptw_translate")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util/oslib-posix.c')
0 files changed, 0 insertions, 0 deletions