]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/arm: Fix BTI versus CF_PCREL
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 9 Aug 2024 16:37:54 +0000 (17:37 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 9 Aug 2024 16:37:54 +0000 (17:37 +0100)
commit64678fc45d8f6c0c8d3adff41e0080aa7af15549
tree34af4510adb827fb1d6b852a8e21e51c80d2cce9
parent0f397dcfecc9211d12c2c720c01eb32f0eaa7d23
target/arm: Fix BTI versus CF_PCREL

With pcrel, we cannot check the guarded page bit at translation
time, as different mappings of the same physical page may or may
not have the GP bit set.

Instead, add a couple of helpers to check the page at runtime,
after all other filters that might obviate the need for the check.

The set_btype_for_br call must be moved after the gen_a64_set_pc
call to ensure the current pc can still be computed.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240802003028.795476-1-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/tcg/helper-a64.c
target/arm/tcg/helper-a64.h
target/arm/tcg/translate-a64.c
target/arm/tcg/translate.h