forked from Minki/linux
KVM: arm/arm64: GICv4: Unmap VLPI when freeing an LPI
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 <cdall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
This commit is contained in:
parent
1b7fe468b0
commit
07b46ed116
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user