mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-05-02 18:15:03 -04:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user