Skip to content

Commit

Permalink
KVM: arm/arm64: GICv4: Unmap VLPI when freeing an LPI
Browse files Browse the repository at this point in the history
When freeing an LPI (on a DISCARD command, for example), we need
to unmap the VLPI down to the physical ITS level.

Acked-by: Christoffer Dall <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Signed-off-by: Christoffer Dall <[email protected]>
  • Loading branch information
Marc Zyngier authored and chazy committed Nov 10, 2017
1 parent 1b7fe46 commit 07b46ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion virt/kvm/arm/vgic/vgic-its.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,12 @@ static void its_free_ite(struct kvm *kvm, struct its_ite *ite)
list_del(&ite->ite_list);

/* This put matches the get in vgic_add_lpi. */
if (ite->irq)
if (ite->irq) {
if (ite->irq->hw)
WARN_ON(its_unmap_vlpi(ite->irq->host_irq));

vgic_put_irq(kvm, ite->irq);
}

kfree(ite);
}
Expand Down

0 comments on commit 07b46ed

Please sign in to comment.