OSDN Git Service

target/arm: Enable SCTLR_EL1.BT0 for aarch64-linux-user
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 27 Apr 2022 04:23:12 +0000 (21:23 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 5 May 2022 08:35:50 +0000 (09:35 +0100)
commitcda86e2b46de857e8b6e16ecd13bb85d81e07899
treebf6320cd591e079db6260b53488740dd79040376
parent1fba9dc71a170b3a05b9d3272dd8ecfe7f26e215
target/arm: Enable SCTLR_EL1.BT0 for aarch64-linux-user

This controls whether the PACI{A,B}SP instructions trap with BTYPE=3
(indirect branch from register other than x16/x17).  The linux kernel
sets this in bti_enable().

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/998
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20220427042312.294300-1-richard.henderson@linaro.org
[PMM: remove stray change to makefile comment]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/cpu.c
tests/tcg/aarch64/Makefile.target
tests/tcg/aarch64/bti-3.c [new file with mode: 0644]