]> git.proxmox.com Git - mirror_qemu.git/commit - target/arm/cpu.h
target/arm: Honour VTCR_EL2 bits in Secure EL2
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 14 Jul 2022 13:23:03 +0000 (14:23 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 18 Jul 2022 12:20:14 +0000 (13:20 +0100)
commitf04383e74926180cc56809ec8319115e4cea32b7
treebb44dd60a8585a18fd45589363a409d626a92719
parentcb4a0a3444dc25fc5d69603ef098020a8767c6a0
target/arm: Honour VTCR_EL2 bits in Secure EL2

In regime_tcr() we return the appropriate TCR register for the
translation regime.  For Secure EL2, we return the VSTCR_EL2 value,
but in this translation regime some fields that control behaviour are
in VTCR_EL2.  When this code was originally written (as the comment
notes), QEMU didn't care about any of those fields, but we have since
added support for features such as LPA2 which do need the values from
those fields.

Synthesize a TCR value by merging in the relevant VTCR_EL2 fields to
the VSTCR_EL2 value.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1103
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220714132303.1287193-8-peter.maydell@linaro.org
target/arm/cpu.h
target/arm/internals.h