diff options
| author | Ingo Molnar <mingo@kernel.org> | 2013-01-24 06:47:48 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2013-01-24 06:47:48 -0500 |
| commit | befddb21c845f8fb49e637997891ef97c6a869dc (patch) | |
| tree | 0e7629123184f2dd50291ad6d477b894175f0f26 /virt/kvm/eventfd.c | |
| parent | e716efde75267eab919cdb2bef5b2cb77f305326 (diff) | |
| parent | 7d1f9aeff1ee4a20b1aeb377dd0f579fe9647619 (diff) | |
Merge tag 'v3.8-rc4' into irq/core
Merge Linux 3.8-rc4 before pulling in new commits - we were on an old v3.7 base.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'virt/kvm/eventfd.c')
| -rw-r--r-- | virt/kvm/eventfd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 9718e98d6d2a..b6eea5cc7b34 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | 35 | ||
| 36 | #include "iodev.h" | 36 | #include "iodev.h" |
| 37 | 37 | ||
| 38 | #ifdef __KVM_HAVE_IOAPIC | ||
| 38 | /* | 39 | /* |
| 39 | * -------------------------------------------------------------------- | 40 | * -------------------------------------------------------------------- |
| 40 | * irqfd: Allows an fd to be used to inject an interrupt to the guest | 41 | * irqfd: Allows an fd to be used to inject an interrupt to the guest |
| @@ -332,7 +333,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args) | |||
| 332 | mutex_lock(&kvm->irqfds.resampler_lock); | 333 | mutex_lock(&kvm->irqfds.resampler_lock); |
| 333 | 334 | ||
| 334 | list_for_each_entry(resampler, | 335 | list_for_each_entry(resampler, |
| 335 | &kvm->irqfds.resampler_list, list) { | 336 | &kvm->irqfds.resampler_list, link) { |
| 336 | if (resampler->notifier.gsi == irqfd->gsi) { | 337 | if (resampler->notifier.gsi == irqfd->gsi) { |
| 337 | irqfd->resampler = resampler; | 338 | irqfd->resampler = resampler; |
| 338 | break; | 339 | break; |
| @@ -425,17 +426,21 @@ fail: | |||
| 425 | kfree(irqfd); | 426 | kfree(irqfd); |
| 426 | return ret; | 427 | return ret; |
| 427 | } | 428 | } |
| 429 | #endif | ||
| 428 | 430 | ||
| 429 | void | 431 | void |
| 430 | kvm_eventfd_init(struct kvm *kvm) | 432 | kvm_eventfd_init(struct kvm *kvm) |
| 431 | { | 433 | { |
| 434 | #ifdef __KVM_HAVE_IOAPIC | ||
| 432 | spin_lock_init(&kvm->irqfds.lock); | 435 | spin_lock_init(&kvm->irqfds.lock); |
| 433 | INIT_LIST_HEAD(&kvm->irqfds.items); | 436 | INIT_LIST_HEAD(&kvm->irqfds.items); |
| 434 | INIT_LIST_HEAD(&kvm->irqfds.resampler_list); | 437 | INIT_LIST_HEAD(&kvm->irqfds.resampler_list); |
| 435 | mutex_init(&kvm->irqfds.resampler_lock); | 438 | mutex_init(&kvm->irqfds.resampler_lock); |
| 439 | #endif | ||
| 436 | INIT_LIST_HEAD(&kvm->ioeventfds); | 440 | INIT_LIST_HEAD(&kvm->ioeventfds); |
| 437 | } | 441 | } |
| 438 | 442 | ||
| 443 | #ifdef __KVM_HAVE_IOAPIC | ||
| 439 | /* | 444 | /* |
| 440 | * shutdown any irqfd's that match fd+gsi | 445 | * shutdown any irqfd's that match fd+gsi |
| 441 | */ | 446 | */ |
| @@ -555,6 +560,7 @@ static void __exit irqfd_module_exit(void) | |||
| 555 | 560 | ||
| 556 | module_init(irqfd_module_init); | 561 | module_init(irqfd_module_init); |
| 557 | module_exit(irqfd_module_exit); | 562 | module_exit(irqfd_module_exit); |
| 563 | #endif | ||
| 558 | 564 | ||
| 559 | /* | 565 | /* |
| 560 | * -------------------------------------------------------------------- | 566 | * -------------------------------------------------------------------- |
