Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297174
b: refs/heads/master
c: cf9eeac
h: refs/heads/master
v: v3
  • Loading branch information
Jan Kiszka authored and Avi Kivity committed Mar 20, 2012
1 parent 4a5c3fe commit a880e55
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 02626b6af5d2bc62db3bb85fc2891b2725535d44
refs/heads/master: cf9eeac46350b8b43730b7dc5e999757bed089a4
2 changes: 1 addition & 1 deletion trunk/include/linux/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ struct kvm_assigned_dev_kernel {
struct pci_dev *dev;
struct kvm *kvm;
spinlock_t intx_lock;
struct mutex intx_mask_lock;
spinlock_t intx_mask_lock;
char irq_name[32];
struct pci_saved_state *pci_saved_state;
};
Expand Down
14 changes: 7 additions & 7 deletions trunk/virt/kvm/assigned-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ kvm_assigned_dev_raise_guest_irq(struct kvm_assigned_dev_kernel *assigned_dev,
{
if (unlikely(assigned_dev->irq_requested_type &
KVM_DEV_IRQ_GUEST_INTX)) {
mutex_lock(&assigned_dev->intx_mask_lock);
spin_lock(&assigned_dev->intx_mask_lock);
if (!(assigned_dev->flags & KVM_DEV_ASSIGN_MASK_INTX))
kvm_set_irq(assigned_dev->kvm,
assigned_dev->irq_source_id, vector, 1);
mutex_unlock(&assigned_dev->intx_mask_lock);
spin_unlock(&assigned_dev->intx_mask_lock);
} else
kvm_set_irq(assigned_dev->kvm, assigned_dev->irq_source_id,
vector, 1);
Expand Down Expand Up @@ -141,7 +141,7 @@ static void kvm_assigned_dev_ack_irq(struct kvm_irq_ack_notifier *kian)

kvm_set_irq(dev->kvm, dev->irq_source_id, dev->guest_irq, 0);

mutex_lock(&dev->intx_mask_lock);
spin_lock(&dev->intx_mask_lock);

if (!(dev->flags & KVM_DEV_ASSIGN_MASK_INTX)) {
bool reassert = false;
Expand All @@ -165,7 +165,7 @@ static void kvm_assigned_dev_ack_irq(struct kvm_irq_ack_notifier *kian)
dev->guest_irq, 1);
}

mutex_unlock(&dev->intx_mask_lock);
spin_unlock(&dev->intx_mask_lock);
}

static void deassign_guest_irq(struct kvm *kvm,
Expand Down Expand Up @@ -707,7 +707,7 @@ static int kvm_vm_ioctl_assign_device(struct kvm *kvm,
match->flags = assigned_dev->flags;
match->dev = dev;
spin_lock_init(&match->intx_lock);
mutex_init(&match->intx_mask_lock);
spin_lock_init(&match->intx_mask_lock);
match->irq_source_id = -1;
match->kvm = kvm;
match->ack_notifier.irq_acked = kvm_assigned_dev_ack_irq;
Expand Down Expand Up @@ -868,7 +868,7 @@ static int kvm_vm_ioctl_set_pci_irq_mask(struct kvm *kvm,
goto out;
}

mutex_lock(&match->intx_mask_lock);
spin_lock(&match->intx_mask_lock);

match->flags &= ~KVM_DEV_ASSIGN_MASK_INTX;
match->flags |= assigned_dev->flags & KVM_DEV_ASSIGN_MASK_INTX;
Expand All @@ -895,7 +895,7 @@ static int kvm_vm_ioctl_set_pci_irq_mask(struct kvm *kvm,
}
}

mutex_unlock(&match->intx_mask_lock);
spin_unlock(&match->intx_mask_lock);

out:
mutex_unlock(&kvm->lock);
Expand Down

0 comments on commit a880e55

Please sign in to comment.