KVM: arm/arm64: GICv4: Handle CLEAR applied to a VLPI
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 27 Oct 2017 14:28:43 +0000 (15:28 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Fri, 10 Nov 2017 08:29:37 +0000 (09:29 +0100)
Handling CLEAR is pretty easy. Just ask the ITS driver to clear
the corresponding pending bit (which will turn into a CLEAR
command on the physical side).

Acked-by: Christoffer Dall <cdall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
virt/kvm/arm/vgic/vgic-its.c

index 80bea70..15e7928 100644 (file)
@@ -1091,6 +1091,10 @@ static int vgic_its_cmd_handle_clear(struct kvm *kvm, struct vgic_its *its,
 
        ite->irq->pending_latch = false;
 
+       if (ite->irq->hw)
+               return irq_set_irqchip_state(ite->irq->host_irq,
+                                            IRQCHIP_STATE_PENDING, false);
+
        return 0;
 }