diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2009-12-23 11:35:24 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-01 10:35:45 -0500 |
commit | e93f8a0f821e290ac5149830110a5f704db7a1fc (patch) | |
tree | f88a5e97286031a8105d63a069a4131b74dab113 /include/linux/kvm_host.h | |
parent | a983fb238728e1123177e8058d4f644b949a7d05 (diff) |
KVM: convert io_bus to SRCU
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 20941c0f4045..5e9cb902550b 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -57,20 +57,20 @@ struct kvm_io_bus { | |||
57 | struct kvm_io_device *devs[NR_IOBUS_DEVS]; | 57 | struct kvm_io_device *devs[NR_IOBUS_DEVS]; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | void kvm_io_bus_init(struct kvm_io_bus *bus); | 60 | enum kvm_bus { |
61 | void kvm_io_bus_destroy(struct kvm_io_bus *bus); | 61 | KVM_MMIO_BUS, |
62 | int kvm_io_bus_write(struct kvm_io_bus *bus, gpa_t addr, int len, | 62 | KVM_PIO_BUS, |
63 | const void *val); | 63 | KVM_NR_BUSES |
64 | int kvm_io_bus_read(struct kvm_io_bus *bus, gpa_t addr, int len, | 64 | }; |
65 | |||
66 | int kvm_io_bus_write(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, | ||
67 | int len, const void *val); | ||
68 | int kvm_io_bus_read(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, int len, | ||
65 | void *val); | 69 | void *val); |
66 | int __kvm_io_bus_register_dev(struct kvm_io_bus *bus, | 70 | int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, |
67 | struct kvm_io_device *dev); | ||
68 | int kvm_io_bus_register_dev(struct kvm *kvm, struct kvm_io_bus *bus, | ||
69 | struct kvm_io_device *dev); | 71 | struct kvm_io_device *dev); |
70 | void __kvm_io_bus_unregister_dev(struct kvm_io_bus *bus, | 72 | int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, |
71 | struct kvm_io_device *dev); | 73 | struct kvm_io_device *dev); |
72 | void kvm_io_bus_unregister_dev(struct kvm *kvm, struct kvm_io_bus *bus, | ||
73 | struct kvm_io_device *dev); | ||
74 | 74 | ||
75 | struct kvm_vcpu { | 75 | struct kvm_vcpu { |
76 | struct kvm *kvm; | 76 | struct kvm *kvm; |
@@ -171,8 +171,7 @@ struct kvm { | |||
171 | atomic_t online_vcpus; | 171 | atomic_t online_vcpus; |
172 | struct list_head vm_list; | 172 | struct list_head vm_list; |
173 | struct mutex lock; | 173 | struct mutex lock; |
174 | struct kvm_io_bus mmio_bus; | 174 | struct kvm_io_bus *buses[KVM_NR_BUSES]; |
175 | struct kvm_io_bus pio_bus; | ||
176 | #ifdef CONFIG_HAVE_KVM_EVENTFD | 175 | #ifdef CONFIG_HAVE_KVM_EVENTFD |
177 | struct { | 176 | struct { |
178 | spinlock_t lock; | 177 | spinlock_t lock; |