linux-yocto/arch/arm64
Marc Zyngier e54aaf5c85 KVM: arm64: Filter out HCR_EL2 bits when running in hypervisor context
commit 303084ad12 upstream.

Most HCR_EL2 bits are not supposed to affect EL2 at all, but only
the guest. However, we gladly merge these bits with the host's
HCR_EL2 configuration, irrespective of entering L1 or L2.

This leads to some funky behaviour, such as L1 trying to inject
a virtual SError for L2, and getting a taste of its own medecine.
Not quite what the architecture anticipated.

In the end, the only bits that matter are those we have defined as
invariants, either because we've made them RESx (E2H, HCD...), or
that we actively refuse to merge because the mess with KVM's own
logic.

Use the sanitisation infrastructure to get the RES1 bits, and let
things rip in a safer way.

Fixes: 04ab519bb8 ("KVM: arm64: nv: Configure HCR_EL2 for FEAT_NV2")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250721101955.535159-3-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-15 16:39:34 +02:00
..
boot arm64: dts: rockchip: Fix UART DMA support for RK3528 2025-08-15 16:38:34 +02:00
configs Qualcomm Arm64 defconfig fixes for v6.16 2025-07-11 13:41:10 +02:00
crypto
hyperv arm64, x86: hyperv: Report the VTL the system boots in 2025-05-23 16:30:55 +00:00
include KVM: arm64: Check for SYSREGS_ON_CPU before accessing the CPU state 2025-08-15 16:39:34 +02:00
kernel arm64/gcs: task_gcs_el0_enable() should use passed task 2025-08-15 16:38:51 +02:00
kvm KVM: arm64: Filter out HCR_EL2 bits when running in hypervisor context 2025-08-15 16:39:34 +02:00
lib lib/crypto/poly1305: Fix arm64's poly1305_blocks_arch() 2025-06-16 12:51:34 -07:00
mm arm64/mm: Drop wrong writes into TCR2_EL1 2025-07-04 16:46:04 +01:00
net bpf, arm64: Fix fp initialization for exception boundary 2025-08-15 16:38:56 +02:00
tools Merge branch kvm-arm64/misc-6.16 into kvmarm-master/next 2025-05-23 10:59:43 +01:00
xen xen/arm: call uaccess_ttbr0_enable for dm_op hypercall 2025-05-23 07:10:02 +02:00
Kbuild
Kconfig arm64: Unconditionally select CONFIG_JUMP_LABEL 2025-07-04 14:47:51 +01:00
Kconfig.debug
Kconfig.platforms arm64: Kconfig: switch to HAVE_PWRCTRL 2025-05-23 15:23:18 -05:00
Makefile