diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2013-02-28 06:33:18 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2013-03-05 17:12:16 -0500 |
commit | a0f155e9646d5f1c263f6f9aae880151100243bb (patch) | |
tree | 761de60204c9c0a5c2208775295c6baa9e5693fb /include/linux/kvm_host.h | |
parent | 6a773cb825afb74a600a08fe87fab55ee98ec2ac (diff) |
KVM: Initialize irqfd from kvm_init().
Currently, eventfd introduces module_init/module_exit functions
to initialize/cleanup the irqfd workqueue. This only works, however,
if no other module_init/module_exit functions are built into the
same module.
Let's just move the initialization and cleanup to kvm_init and kvm_exit.
This way, it is also clearer where kvm startup may fail.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index ac584cc53581..d50fe173028b 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -424,6 +424,19 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu); | |||
424 | int __must_check vcpu_load(struct kvm_vcpu *vcpu); | 424 | int __must_check vcpu_load(struct kvm_vcpu *vcpu); |
425 | void vcpu_put(struct kvm_vcpu *vcpu); | 425 | void vcpu_put(struct kvm_vcpu *vcpu); |
426 | 426 | ||
427 | #ifdef __KVM_HAVE_IOAPIC | ||
428 | int kvm_irqfd_init(void); | ||
429 | void kvm_irqfd_exit(void); | ||
430 | #else | ||
431 | static inline int kvm_irqfd_init(void) | ||
432 | { | ||
433 | return 0; | ||
434 | } | ||
435 | |||
436 | static inline void kvm_irqfd_exit(void) | ||
437 | { | ||
438 | } | ||
439 | #endif | ||
427 | int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, | 440 | int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align, |
428 | struct module *module); | 441 | struct module *module); |
429 | void kvm_exit(void); | 442 | void kvm_exit(void); |