linux-stable/arch/arm64
Catalin Marinas 1f80d15020 KVM: arm64: Avoid setting the upper 32 bits of TCR_EL2 and CPTR_EL2 to 1
Having a signed (1 << 31) constant for TCR_EL2_RES1 and CPTR_EL2_TCPAC
causes the upper 32-bit to be set to 1 when assigning them to a 64-bit
variable. Bit 32 in TCR_EL2 is no longer RES0 in ARMv8.7: with FEAT_LPA2
it changes the meaning of bits 49:48 and 9:8 in the stage 1 EL2 page
table entries. As a result of the sign-extension, a non-VHE kernel can
no longer boot on a model with ARMv8.7 enabled.

CPTR_EL2 still has the top 32 bits RES0 but we should preempt any future
problems

Make these top bit constants unsigned as per commit df655b75c4
("arm64: KVM: Avoid setting the upper 32 bits of VTCR_EL2 to 1").

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Chris January <Chris.January@arm.com>
Cc: <stable@vger.kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211125152014.2806582-1-catalin.marinas@arm.com
2021-11-25 15:51:25 +00:00
..
boot ARM: SoC DT updates for v5.16 2021-11-03 16:56:03 -07:00
configs ARM: defconfig updates for 5.16 2021-11-03 17:07:02 -07:00
crypto crypto: arm64/aes-ccm - avoid by-ref argument for ce_aes_ccm_auth_data 2021-09-17 11:05:11 +08:00
hyperv
include KVM: arm64: Avoid setting the upper 32 bits of TCR_EL2 and CPTR_EL2 to 1 2021-11-25 15:51:25 +00:00
kernel Char/Misc fix for 5.16-rc1 2021-11-11 09:44:29 -08:00
kvm KVM: arm64: Move pkvm's special 32bit handling into a generic infrastructure 2021-11-24 13:30:50 +00:00
lib Kbuild updates for v5.16 2021-11-08 09:15:45 -08:00
mm kasan: add kasan mode messages when kasan init 2021-11-11 09:34:35 -08:00
net arm64 updates for 5.16 2021-11-01 16:33:53 -07:00
tools Merge branch 'for-next/trbe-errata' into for-next/core 2021-10-29 12:25:33 +01:00
xen xen: allow pv-only hypercalls only with CONFIG_XEN_PV 2021-11-02 08:11:01 -05:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig Merge branch 'akpm' (patches from Andrew) 2021-11-06 14:08:17 -07:00
Kconfig.debug
Kconfig.platforms ARM: SoC drivers for 5.16 2021-11-03 17:00:52 -07:00
Makefile kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00