On Tue, 2011-07-19 at 11:48 +0300, Avi Kivity wrote: > On 07/19/2011 11:10 AM, Sasha Levin wrote: > > 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. > > > > > > > > #include "coalesced_mmio.h" > > > > +static spinlock_t lock; > > +static LIST_HEAD(head); > > Make these per-guest instead of global. The lock may be contended, and > the list shouldn't hold items from different guests (why is it needed, > anyway?) > We only need the list for removal, since we only have the range we want to remove, and we want to find all devices which contain this range. > The coalesced mmio devices will now contend with other io devices for > NR_IOBUS_DEVS, so need to increase that (by KVM_COALESCED_MMIO_ZONE_MAX). > -- Sasha. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html