All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] KVM: arm64: Fixes/clarification for GICv4 vLPI injection
@ 2025-02-26 18:31 Oliver Upton
  2025-02-26 18:31 ` [PATCH 1/4] KVM: arm64: vgic-v4: Only attempt vLPI mapping for actual MSIs Oliver Upton
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Oliver Upton @ 2025-02-26 18:31 UTC (permalink / raw)
  To: kvmarm; +Cc: Marc Zyngier, Joey Gouly, Suzuki K Poulose, Oliver Upton

Small batch of fixes for vLPI injection issues that can happen when
userspace is being mean:

 - MSI interrupt sources could be mapped to non-MSI GSI routing entries.
   KVM doesn't account for the routing type and blindly attempts to map
   a vLPI.

 - KVM_IRQFD mappings could be installed before the ITS has been
   restored, leading to kvm_vgic_v4_set_forwarding() failing due to the
   missing guest translation

Prevent userspace from triggering a WARN() because of these issues and
gracefully fall back to software vLPI routing/injection should irqbypass
fail.

I've thrown in some documentation on the restore ordering necessary to get
GICv4 vLPI injection working correctly as well.

Marc, I'm planning to take these for 6.15.

Oliver Upton (4):
  KVM: arm64: vgic-v4: Only attempt vLPI mapping for actual MSIs
  KVM: arm64: vgic-v4: Only WARN for HW IRQ mismatch when unmapping vLPI
  KVM: arm64: vgic-v4: Fall back to software irqbypass if LPI not found
  KVM: arm64: Document ordering requirements for irqbypass

 Documentation/virt/kvm/devices/arm-vgic-its.rst |  5 ++++-
 arch/arm64/kvm/arm.c                            | 12 ++++++++++++
 arch/arm64/kvm/vgic/vgic-v4.c                   | 17 +++++++++++------
 3 files changed, 27 insertions(+), 7 deletions(-)


base-commit: 0ad2507d5d93f39619fc42372c347d6006b64319
-- 
2.39.5


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

end of thread, other threads:[~2025-02-26 21:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-26 18:31 [PATCH 0/4] KVM: arm64: Fixes/clarification for GICv4 vLPI injection Oliver Upton
2025-02-26 18:31 ` [PATCH 1/4] KVM: arm64: vgic-v4: Only attempt vLPI mapping for actual MSIs Oliver Upton
2025-02-26 18:31 ` [PATCH 2/4] KVM: arm64: vgic-v4: Only WARN for HW IRQ mismatch when unmapping vLPI Oliver Upton
2025-02-26 18:31 ` [PATCH 3/4] KVM: arm64: vgic-v4: Fall back to software irqbypass if LPI not found Oliver Upton
2025-02-26 18:31 ` [PATCH 4/4] KVM: arm64: Document ordering requirements for irqbypass Oliver Upton
2025-02-26 18:58 ` [PATCH 0/4] KVM: arm64: Fixes/clarification for GICv4 vLPI injection Marc Zyngier
2025-02-26 21:27 ` Oliver Upton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.