Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133709
b: refs/heads/master
c: 269e05e
h: refs/heads/master
i:
  133707: 29bcce4
v: v3
  • Loading branch information
Avi Kivity committed Mar 24, 2009
1 parent 46d77ad commit bb66cb9
Show file tree
Hide file tree
Showing 3 changed files with 7 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: a77ab5ead5c1fef2c6c5a9b3cf3765e52643a2aa
refs/heads/master: 269e05e48502f1cc06802e9fba90f5100dd6bb0d
2 changes: 0 additions & 2 deletions trunk/arch/x86/kvm/i8254.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,7 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm)
if (!pit)
return NULL;

mutex_lock(&kvm->lock);
pit->irq_source_id = kvm_request_irq_source_id(kvm);
mutex_unlock(&kvm->lock);
if (pit->irq_source_id < 0) {
kfree(pit);
return NULL;
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -1837,10 +1837,16 @@ long kvm_arch_vm_ioctl(struct file *filp,
goto out;
break;
case KVM_CREATE_PIT:
mutex_lock(&kvm->lock);
r = -EEXIST;
if (kvm->arch.vpit)
goto create_pit_unlock;
r = -ENOMEM;
kvm->arch.vpit = kvm_create_pit(kvm);
if (kvm->arch.vpit)
r = 0;
create_pit_unlock:
mutex_unlock(&kvm->lock);
break;
case KVM_IRQ_LINE: {
struct kvm_irq_level irq_event;
Expand Down

0 comments on commit bb66cb9

Please sign in to comment.