aboutsummaryrefslogtreecommitdiff
path: root/target/arm/internals.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2023-10-31 17:37:23 +0000
committerPeter Maydell <peter.maydell@linaro.org>2023-11-02 13:36:45 +0000
commit4c09abeae8704970ff03bf2196973f6bf08ab6f9 (patch)
tree8da7f925f6ba8278499b8ccf25ed24e2e10e3238 /target/arm/internals.h
parente9f30b1e7f9e25e73f626596620778b2561f0c2e (diff)
target/arm: Correctly propagate stage 1 BTI guarded bit in a two-stage walk
In a two-stage translation, the result of the BTI guarded bit should be the guarded bit from the first stage of translation, as there is no BTI guard information in stage two. Our code tried to do this, but got it wrong, because we currently have two fields where the GP bit information might live (ARMCacheAttrs::guarded and CPUTLBEntryFull::extra::arm::guarded), and we were storing the GP bit in the latter during the stage 1 walk but trying to copy the former in combine_cacheattrs(). Remove the duplicated storage, and always use the field in CPUTLBEntryFull; correctly propagate the stage 1 value to the output in get_phys_addr_twostage(). Note for stable backports: in v8.0 and earlier the field is named result->f.guarded, not result->f.extra.arm.guarded. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1950 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20231031173723.26582-1-peter.maydell@linaro.org
Diffstat (limited to 'target/arm/internals.h')
-rw-r--r--target/arm/internals.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/target/arm/internals.h b/target/arm/internals.h
index f7224e6f4d..c837506e44 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -1181,7 +1181,6 @@ typedef struct ARMCacheAttrs {
unsigned int attrs:8;
unsigned int shareability:2; /* as in the SH field of the VMSAv8-64 PTEs */
bool is_s2_format:1;
- bool guarded:1; /* guarded bit of the v8-64 PTE */
} ARMCacheAttrs;
/* Fields that are valid upon success. */