[PATCH v2 0/4] KVM: arm64: pkvm: Fix missing reset of GICv3 LRs
Vincent Donnefort
vdonnefort at google.com
Thu Oct 22 07:00:44 PDT 2026
The GICv3 List Registers (LRs) are architecturally UNKNOWN when a CPU
boots or wakes up from a low-power state. When pKVM is enabled,
__vgic_v3_init_lrs() is currently never called on boot, CPU hotplug, or
CPU PM resume.
Following Marc's comments on v1, instead of handling the LR reset purely
inside the pKVM hypervisor, this series fixes the host CPU init, hotplug,
and PM paths to properly reset the vGIC LRs even when pKVM keeps the EL2
installed. This removes a few calls to is_protected_kvm_enabled() making
the whole hypervisor init machinery more generic.
Since pKVM can't trust the a deprivileged host, keep the reset in the
CPU_ON/CPU_SUSPEND path.
Changelog:
v2:
* Make the __vgic_v3_init_lrs HVC always available. (Marc)
* Propagate __hyp_reset_vectors() error and remove
is_protected_kvm_enabled() special-casing in the host CPU init/PM
paths so the host resets the vGIC LRs. (Marc)
v1 (https://lore.kernel.org/all/20261021110000.508827-1-vdonnefort@google.com/)
Vincent Donnefort (4):
KVM: arm64: Make __vgic_v3_init_lrs HVC always available
KVM: arm64: pkvm: Fix missing reset of GICv3 LRs
KVM: arm64: pkvm: Reset GICv3 LRs in the hypervisor
KVM: arm64: pkvm: Avoid trapping on HVC_RESET_VECTORS
arch/arm64/include/asm/kvm_asm.h | 2 +-
arch/arm64/include/asm/virt.h | 2 +-
arch/arm64/kvm/arm.c | 58 ++++++++++++++++------------
arch/arm64/kvm/hyp/nvhe/hyp-main.c | 5 ++-
arch/arm64/kvm/hyp/nvhe/psci-relay.c | 4 ++
5 files changed, 43 insertions(+), 28 deletions(-)
base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
--
2.56.0.257.gf7497c7d27-goog
More information about the linux-arm-kernel
mailing list