Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125272
b: refs/heads/master
c: f29b267
h: refs/heads/master
v: v3
  • Loading branch information
Mark McLoughlin authored and Avi Kivity committed Dec 31, 2008
1 parent 641f7e0 commit 7146ebc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: fdd897e6b5253a45b633f7d334cf3e150bbaf386
refs/heads/master: f29b2673d3fc7ae38ec22922e9cdc75ee37386b5
7 changes: 5 additions & 2 deletions trunk/virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ static void kvm_free_assigned_device(struct kvm *kvm,
pci_disable_msi(assigned_dev->dev);

kvm_unregister_irq_ack_notifier(&assigned_dev->ack_notifier);
kvm_free_irq_source_id(kvm, assigned_dev->irq_source_id);

if (assigned_dev->irq_source_id != -1)
kvm_free_irq_source_id(kvm, assigned_dev->irq_source_id);
assigned_dev->irq_source_id = -1;

if (cancel_work_sync(&assigned_dev->interrupt_work))
/* We had pending work. That means we will have to take
Expand Down Expand Up @@ -466,7 +469,7 @@ static int kvm_vm_ioctl_assign_device(struct kvm *kvm,
match->host_busnr = assigned_dev->busnr;
match->host_devfn = assigned_dev->devfn;
match->dev = dev;

match->irq_source_id = -1;
match->kvm = kvm;

list_add(&match->list, &kvm->arch.assigned_dev_head);
Expand Down

0 comments on commit 7146ebc

Please sign in to comment.