]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/arm: Use bit 55 explicitly for pauth
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 16 Feb 2020 19:43:40 +0000 (11:43 -0800)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 21 Feb 2020 16:07:00 +0000 (16:07 +0000)
The psuedocode in aarch64/functions/pac/auth/Auth and
aarch64/functions/pac/strip/Strip always uses bit 55 for
extfield and do not consider if the current regime has 2 ranges.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20200216194343.21331-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/pauth_helper.c

index 9746e32bf817f2ab89732d113ab25733087acbfd..b909630317ecede831df7d0dd3d8c5a7646d6b70 100644 (file)
@@ -320,7 +320,8 @@ static uint64_t pauth_addpac(CPUARMState *env, uint64_t ptr, uint64_t modifier,
 
 static uint64_t pauth_original_ptr(uint64_t ptr, ARMVAParameters param)
 {
-    uint64_t extfield = -param.select;
+    /* Note that bit 55 is used whether or not the regime has 2 ranges. */
+    uint64_t extfield = sextract64(ptr, 55, 1);
     int bot_pac_bit = 64 - param.tsz;
     int top_pac_bit = 64 - 8 * param.tbi;