Skip to content

Commit cced50c

Browse files
committed
arm/arm64: KVM: vgic: Clear queued flags on unqueue
If we unqueue a level-triggered interrupt completely, and the LR does not stick around in the active state (and will therefore no longer generate a maintenance interrupt), then we should clear the queued flag so that the vgic can actually queue this level-triggered interrupt at a later time and deal with its pending state then. Note: This should actually be properly fixed to handle the active state on the distributor. Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
1 parent dbf20f9 commit cced50c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎virt/kvm/arm/vgic.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,10 @@ static void vgic_unqueue_irqs(struct kvm_vcpu *vcpu)
667667
* active), then the LR does not hold any useful info and can
668668
* be marked as free for other use.
669669
*/
670-
if (!(lr.state & LR_STATE_MASK))
670+
if (!(lr.state & LR_STATE_MASK)) {
671671
vgic_retire_lr(i, lr.irq, vcpu);
672+
vgic_irq_clear_queued(vcpu, lr.irq);
673+
}
672674

673675
/* Finally update the VGIC state. */
674676
vgic_update_state(vcpu->kvm);

0 commit comments

Comments
 (0)