[PATCH v3 0/3] KVM: arm64: pkvm: Fix missing reset of GICv3 LRs

Vincent Donnefort vdonnefort at google.com
Mon Oct 26 09:39:34 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 inside
the pKVM hypervisor, this series fixes the host CPU init, hotplug, and
PM paths to properly reset the vGIC LRs even when pKVM is enabled. This
removes a few calls to is_protected_kvm_enabled(), making the whole
hypervisor init machinery more generic.

Since pKVM can't trust the deprivileged host, keep the reset in the
CPU_ON/CPU_SUSPEND path.

Changelog:

v3:
  * Drop "KVM: arm64: pkvm: Avoid trapping on HVC_RESET_VECTORS". (Fuad)
  * Collect Fuad's tags.
  * Apply the few nits (Fuad)

v2 (https://lore.kernel.org/all/20261022140048.2522787-1-vdonnefort@google.com/):
  * 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 (3):
  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

 arch/arm64/include/asm/kvm_asm.h     |  2 +-
 arch/arm64/include/asm/virt.h        |  2 +-
 arch/arm64/kvm/arm.c                 | 50 +++++++++++++++-------------
 arch/arm64/kvm/hyp/nvhe/hyp-main.c   |  5 +--
 arch/arm64/kvm/hyp/nvhe/psci-relay.c |  4 +++
 5 files changed, 36 insertions(+), 27 deletions(-)


base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
-- 
2.56.0.257.gf7497c7d27-goog




More information about the linux-arm-kernel mailing list