Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] KVM: arm64: pkvm: Fix missing reset of GICv3 LRs
@ 2026-10-22 14:00 Vincent Donnefort
  2026-10-22 14:00 ` [PATCH v2 1/4] KVM: arm64: Make __vgic_v3_init_lrs HVC always available Vincent Donnefort
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Vincent Donnefort @ 2026-10-22 14:00 UTC (permalink / raw)
  To: maz, oupton, kvmarm, linux-arm-kernel
  Cc: joey.gouly, seiden, suzuki.poulose, yuzenghui, catalin.marinas,
	will, kernel-team, fuad.tabba, Vincent Donnefort

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



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-10-23  8:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-22 14:00 [PATCH v2 0/4] KVM: arm64: pkvm: Fix missing reset of GICv3 LRs Vincent Donnefort
2026-10-22 14:00 ` [PATCH v2 1/4] KVM: arm64: Make __vgic_v3_init_lrs HVC always available Vincent Donnefort
2026-10-22 17:34   ` Fuad Tabba
2026-10-22 14:00 ` [PATCH v2 2/4] KVM: arm64: pkvm: Fix missing reset of GICv3 LRs Vincent Donnefort
2026-10-22 17:36   ` Fuad Tabba
2026-10-23  7:59     ` Vincent Donnefort
2026-10-23  8:14       ` Fuad Tabba
2026-10-22 14:00 ` [PATCH v2 3/4] KVM: arm64: pkvm: Reset GICv3 LRs in the hypervisor Vincent Donnefort
2026-10-22 17:37   ` Fuad Tabba
2026-10-22 14:00 ` [PATCH v2 4/4] KVM: arm64: pkvm: Avoid trapping on HVC_RESET_VECTORS Vincent Donnefort
2026-10-22 17:38   ` Fuad Tabba
2026-10-23  8:01     ` Vincent Donnefort

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox