OSDN Git Service

KVM: arm64: vgic: Drop WARN from vgic_get_irq
authorRicardo Koller <ricarkol@google.com>
Wed, 18 Aug 2021 21:32:05 +0000 (14:32 -0700)
committerMarc Zyngier <maz@kernel.org>
Thu, 19 Aug 2021 10:31:04 +0000 (11:31 +0100)
vgic_get_irq(intid) is used all over the vgic code in order to get a
reference to a struct irq. It warns whenever intid is not a valid number
(like when it's a reserved IRQ number). The issue is that this warning
can be triggered from userspace (e.g., KVM_IRQ_LINE for intid 1020).

Drop the WARN call from vgic_get_irq.

Signed-off-by: Ricardo Koller <ricarkol@google.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210818213205.598471-1-ricarkol@google.com
arch/arm64/kvm/vgic/vgic.c

index 111bff4..81cec50 100644 (file)
@@ -106,7 +106,6 @@ struct vgic_irq *vgic_get_irq(struct kvm *kvm, struct kvm_vcpu *vcpu,
        if (intid >= VGIC_MIN_LPI)
                return vgic_get_lpi(kvm, intid);
 
-       WARN(1, "Looking up struct vgic_irq for reserved INTID");
        return NULL;
 }