From: Christoffer Dall <christoffer.dall@linaro.org>
Date: Fri, 10 Nov 2017 09:34:54 +0100
Subject: KVM: arm/arm64: Don't queue VLPIs on INV/INVALL
Patch-mainline: v4.15-rc1
Git-commit: 95b110ab9a093b5baf3a72e51f71279368d618e2
References: bsc#1077761
Since VLPIs are injected directly by the hardware there's no need to
mark these as pending in software and queue them on the AP list.
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Acked-by: Alexander Graf <agraf@suse.de>
---
virt/kvm/arm/vgic/vgic-its.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/virt/kvm/arm/vgic/vgic-its.c
+++ b/virt/kvm/arm/vgic/vgic-its.c
@@ -292,11 +292,14 @@
irq->priority = LPI_PROP_PRIORITY(prop);
irq->enabled = LPI_PROP_ENABLE_BIT(prop);
- vgic_queue_irq_unlock(kvm, irq, flags);
- } else {
- spin_unlock_irqrestore(&irq->irq_lock, flags);
+ if (!irq->hw) {
+ vgic_queue_irq_unlock(kvm, irq, flags);
+ return 0;
+ }
}
+ spin_unlock_irqrestore(&irq->irq_lock, flags);
+
if (irq->hw)
return its_prop_update_vlpi(irq->host_irq, prop, needs_inv);