Skip to content

Commit d0b7956

Browse files
committed
KVM: arm64: vgic-v4: Only WARN for HW IRQ mismatch when unmapping vLPI
The VMM or guest can easily screw up GICv4 vLPI injection by misconfiguring the MSI or the virtual ITS. Don't fuss over it; limit the WARN in vgic_v4_unset_forwarding() to fire in the worrying case where an unrelated HW IRQ was mapped to a vLPI. Reported-by: Sudheer Dantuluri <dantuluris@google.com> Tested-by: Sudheer Dantuluri <dantuluris@google.com> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20250226183124.82094-3-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
1 parent a0d7e2f commit d0b7956

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kvm/vgic/vgic-v4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ int kvm_vgic_v4_unset_forwarding(struct kvm *kvm, int virq,
512512
if (ret)
513513
goto out;
514514

515-
WARN_ON(!(irq->hw && irq->host_irq == virq));
515+
WARN_ON(irq->hw && irq->host_irq != virq);
516516
if (irq->hw) {
517517
atomic_dec(&irq->target_vcpu->arch.vgic_cpu.vgic_v3.its_vpe.vlpi_count);
518518
irq->hw = false;

0 commit comments

Comments
 (0)