diff options
author | Andre Przywara <andre.przywara@arm.com> | 2018-05-11 10:20:13 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-05-15 07:36:44 -0400 |
commit | 9c4188762f7fee032abf8451fd9865a9abfc5516 (patch) | |
tree | 9410dcbf4b080aed3e6abba8d4e209520092f869 | |
parent | 388d4359680b56dba82fe2ffca05871e9fd2b73e (diff) |
KVM: arm/arm64: VGIC/ITS: Promote irq_lock() in update_affinity
Apparently the development of update_affinity() overlapped with the
promotion of irq_lock to be _irqsave, so the patch didn't convert this
lock over. This will make lockdep complain.
Fix this by disabling IRQs around the lock.
Cc: stable@vger.kernel.org
Fixes: 08c9fd042117 ("KVM: arm/arm64: vITS: Add a helper to update the affinity of an LPI")
Reported-by: Jan Glauber <jan.glauber@caviumnetworks.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | virt/kvm/arm/vgic/vgic-its.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c index 41abf92f2699..51a80b600632 100644 --- a/virt/kvm/arm/vgic/vgic-its.c +++ b/virt/kvm/arm/vgic/vgic-its.c | |||
@@ -350,10 +350,11 @@ static int vgic_copy_lpi_list(struct kvm_vcpu *vcpu, u32 **intid_ptr) | |||
350 | static int update_affinity(struct vgic_irq *irq, struct kvm_vcpu *vcpu) | 350 | static int update_affinity(struct vgic_irq *irq, struct kvm_vcpu *vcpu) |
351 | { | 351 | { |
352 | int ret = 0; | 352 | int ret = 0; |
353 | unsigned long flags; | ||
353 | 354 | ||
354 | spin_lock(&irq->irq_lock); | 355 | spin_lock_irqsave(&irq->irq_lock, flags); |
355 | irq->target_vcpu = vcpu; | 356 | irq->target_vcpu = vcpu; |
356 | spin_unlock(&irq->irq_lock); | 357 | spin_unlock_irqrestore(&irq->irq_lock, flags); |
357 | 358 | ||
358 | if (irq->hw) { | 359 | if (irq->hw) { |
359 | struct its_vlpi_map map; | 360 | struct its_vlpi_map map; |