File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -782,13 +782,15 @@ struct kvm {
782782 struct list_head vm_list ;
783783 struct mutex lock ;
784784 struct kvm_io_bus __rcu * buses [KVM_NR_BUSES ];
785+ #ifdef CONFIG_HAVE_KVM_IRQCHIP
785786 struct {
786787 spinlock_t lock ;
787788 struct list_head items ;
788789 /* resampler_list update side is protected by resampler_lock. */
789790 struct list_head resampler_list ;
790791 struct mutex resampler_lock ;
791792 } irqfds ;
793+ #endif
792794 struct list_head ioeventfds ;
793795 struct kvm_vm_stat stat ;
794796 struct kvm_arch arch ;
Original file line number Diff line number Diff line change @@ -526,21 +526,7 @@ void kvm_unregister_irq_ack_notifier(struct kvm *kvm,
526526 synchronize_srcu (& kvm -> irq_srcu );
527527 kvm_arch_post_irq_ack_notifier_list_update (kvm );
528528}
529- #endif
530-
531- void
532- kvm_eventfd_init (struct kvm * kvm )
533- {
534- #ifdef CONFIG_HAVE_KVM_IRQCHIP
535- spin_lock_init (& kvm -> irqfds .lock );
536- INIT_LIST_HEAD (& kvm -> irqfds .items );
537- INIT_LIST_HEAD (& kvm -> irqfds .resampler_list );
538- mutex_init (& kvm -> irqfds .resampler_lock );
539- #endif
540- INIT_LIST_HEAD (& kvm -> ioeventfds );
541- }
542529
543- #ifdef CONFIG_HAVE_KVM_IRQCHIP
544530/*
545531 * shutdown any irqfd's that match fd+gsi
546532 */
@@ -1012,3 +998,15 @@ kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)
1012998
1013999 return kvm_assign_ioeventfd (kvm , args );
10141000}
1001+
1002+ void
1003+ kvm_eventfd_init (struct kvm * kvm )
1004+ {
1005+ #ifdef CONFIG_HAVE_KVM_IRQCHIP
1006+ spin_lock_init (& kvm -> irqfds .lock );
1007+ INIT_LIST_HEAD (& kvm -> irqfds .items );
1008+ INIT_LIST_HEAD (& kvm -> irqfds .resampler_list );
1009+ mutex_init (& kvm -> irqfds .resampler_lock );
1010+ #endif
1011+ INIT_LIST_HEAD (& kvm -> ioeventfds );
1012+ }
You can’t perform that action at this time.
0 commit comments