Marcelo Tosatti wrote:
Move coalesced_mmio locking to its own device, instead of relying on
kvm->lock.
Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>
Index: kvm-irqlock/virt/kvm/coalesced_mmio.c
===================================================================
--- kvm-irqlock.orig/virt/kvm/coalesced_mmio.c
+++ kvm-irqlock/virt/kvm/coalesced_mmio.c
@@ -26,9 +26,7 @@ static int coalesced_mmio_in_range(struc
if (!is_write)
return 0;
- /* kvm->lock is taken by the caller and must be not released before
- * dev.read/write
- */
+ spin_lock(&dev->lock);
This unbalanced locking is still very displeasing. At a minimum you
need a sparse annotation to indicate it.
But I think it really indicates a problem with the io_device API.
Potential solutions:
- fold in_range() into ->write and ->read. Make those functions
responsible for both determining whether they can handle the range and
performing the I/O.
- have a separate rwlock for the device list.
--
error compiling committee.c: too many arguments to function
--
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