summaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorSasha Levin <levinsasha928@gmail.com>2011-07-20 20:59:00 +0300
committerAvi Kivity <avi@redhat.com>2011-09-25 19:17:57 +0300
commit2b3c246a682c50f5415c71fc5387a114a6f0d643 (patch)
treee520633a4c5460bd4e8ebd761af06d1a3af8b722 /include/linux/kvm_host.h
parent8c3ba334f8588e1d5099f8602cf01897720e0eca (diff)
downloadop-kernel-dev-2b3c246a682c50f5415c71fc5387a114a6f0d643.zip
op-kernel-dev-2b3c246a682c50f5415c71fc5387a114a6f0d643.tar.gz
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/linux/kvm_host.h')
-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 eabb21a..ff4d406 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -63,7 +63,7 @@ extern struct kmem_cache *kvm_vcpu_cache;
*/
struct kvm_io_bus {
int dev_count;
-#define NR_IOBUS_DEVS 200
+#define NR_IOBUS_DEVS 300
struct kvm_io_device *devs[NR_IOBUS_DEVS];
};
@@ -256,8 +256,9 @@ struct kvm {
struct kvm_arch arch;
atomic_t users_count;
#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
- struct kvm_coalesced_mmio_dev *coalesced_mmio_dev;
struct kvm_coalesced_mmio_ring *coalesced_mmio_ring;
+ spinlock_t ring_lock;
+ struct list_head coalesced_zones;
#endif
struct mutex irq_lock;
OpenPOWER on IntegriCloud