Skip to content

Commit 9c41887

Browse files
Andre-ARMbonzini
authored andcommitted
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: [email protected] Fixes: 08c9fd0 ("KVM: arm/arm64: vITS: Add a helper to update the affinity of an LPI") Reported-by: Jan Glauber <[email protected]> Signed-off-by: Andre Przywara <[email protected]> Acked-by: Christoffer Dall <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 388d435 commit 9c41887

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

virt/kvm/arm/vgic/vgic-its.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,11 @@ static int vgic_copy_lpi_list(struct kvm_vcpu *vcpu, u32 **intid_ptr)
350350
static int update_affinity(struct vgic_irq *irq, struct kvm_vcpu *vcpu)
351351
{
352352
int ret = 0;
353+
unsigned long flags;
353354

354-
spin_lock(&irq->irq_lock);
355+
spin_lock_irqsave(&irq->irq_lock, flags);
355356
irq->target_vcpu = vcpu;
356-
spin_unlock(&irq->irq_lock);
357+
spin_unlock_irqrestore(&irq->irq_lock, flags);
357358

358359
if (irq->hw) {
359360
struct its_vlpi_map map;

0 commit comments

Comments
 (0)