aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSasha Levin <levinsasha928@gmail.com>2011-07-20 13:59:00 -0400
committerAvi Kivity <avi@redhat.com>2011-09-25 12:17:57 -0400
commit2b3c246a682c50f5415c71fc5387a114a6f0d643 (patch)
treee520633a4c5460bd4e8ebd761af06d1a3af8b722 /include
parent8c3ba334f8588e1d5099f8602cf01897720e0eca (diff)
KVM: Make coalesced mmio use a device per zone
This patch changes coalesced mmio to create one mmio device per zone instead of handling all zones in one device. Doing so enables us to take advantage of existing locking and prevents a race condition between coalesced mmio registration/unregistration and lookups. Suggested-by: Avi Kivity <avi@redhat.com> Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kvm_host.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index eabb21a30c34..ff4d4062af9d 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -63,7 +63,7 @@ extern struct kmem_cache *kvm_vcpu_cache;
63 */ 63 */
64struct kvm_io_bus { 64struct kvm_io_bus {
65 int dev_count; 65 int dev_count;
66#define NR_IOBUS_DEVS 200 66#define NR_IOBUS_DEVS 300
67 struct kvm_io_device *devs[NR_IOBUS_DEVS]; 67 struct kvm_io_device *devs[NR_IOBUS_DEVS];
68}; 68};
69 69
@@ -256,8 +256,9 @@ struct kvm {
256 struct kvm_arch arch; 256 struct kvm_arch arch;
257 atomic_t users_count; 257 atomic_t users_count;
258#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET 258#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
259 struct kvm_coalesced_mmio_dev *coalesced_mmio_dev;
260 struct kvm_coalesced_mmio_ring *coalesced_mmio_ring; 259 struct kvm_coalesced_mmio_ring *coalesced_mmio_ring;
260 spinlock_t ring_lock;
261 struct list_head coalesced_zones;
261#endif 262#endif
262 263
263 struct mutex irq_lock; 264 struct mutex irq_lock;