Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172285
b: refs/heads/master
c: 0c6ddce
h: refs/heads/master
i:
  172283: a61b06a
v: v3
  • Loading branch information
Jiri Slaby authored and Avi Kivity committed Dec 3, 2009
1 parent 9b4e7c6 commit bb8e751
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: e935d48e1b49451490218e1181d9834176200955
refs/heads/master: 0c6ddcebd8303ada6faefa6f72ac18b6230320c4
7 changes: 5 additions & 2 deletions trunk/virt/kvm/irq_comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,13 @@ int kvm_request_irq_source_id(struct kvm *kvm)

if (irq_source_id >= sizeof(kvm->arch.irq_sources_bitmap)) {
printk(KERN_WARNING "kvm: exhaust allocatable IRQ sources!\n");
return -EFAULT;
irq_source_id = -EFAULT;
goto unlock;
}

ASSERT(irq_source_id != KVM_USERSPACE_IRQ_SOURCE_ID);
set_bit(irq_source_id, bitmap);
unlock:
mutex_unlock(&kvm->irq_lock);

return irq_source_id;
Expand All @@ -240,7 +242,7 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id)
if (irq_source_id < 0 ||
irq_source_id >= sizeof(kvm->arch.irq_sources_bitmap)) {
printk(KERN_ERR "kvm: IRQ source ID out of range!\n");
return;
goto unlock;
}
for (i = 0; i < KVM_IOAPIC_NUM_PINS; i++) {
clear_bit(irq_source_id, &kvm->arch.vioapic->irq_states[i]);
Expand All @@ -251,6 +253,7 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id)
#endif
}
clear_bit(irq_source_id, &kvm->arch.irq_sources_bitmap);
unlock:
mutex_unlock(&kvm->irq_lock);
}

Expand Down

0 comments on commit bb8e751

Please sign in to comment.