Message ID | 152626684503.26828.16869042301439556281.malone@chaenomeles.canonical.com |
---|---|
State | New |
Headers | show |
Series | [Bug,1771042] Re: dataplane interrupt handler doesn't support msi | expand |
On Mon, May 14, 2018 at 03:00:44AM -0000, eric hoffman wrote: > diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c > index 101f32c..31d9eb8 100644 > --- a/hw/block/dataplane/virtio-blk.c > +++ b/hw/block/dataplane/virtio-blk.c > @@ -73,7 +73,7 @@ static void notify_guest_bh(void *opaque) > unsigned i = j + ctzl(bits); > VirtQueue *vq = virtio_get_queue(s->vdev, i); > > - virtio_notify_irqfd(s->vdev, vq); > + virtio_notify(s->vdev, vq); > > bits &= bits - 1; /* clear right-most bit */ > } Please send patches to qemu-devel@nongnu.org. Guidelines for submitting patches are here: https://wiki.qemu.org/Contribute/SubmitAPatch The issue with this approach is that hw/pci/msi.c:msi_send_message() invokes device emulation outside the QEMU global mutex (it calls into the APIC to send MSIs). I've CCed Paolo Bonzini to check whether doing this is thread-safe. Stefan
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index 101f32c..31d9eb8 100644 --- a/hw/block/dataplane/virtio-blk.c +++ b/hw/block/dataplane/virtio-blk.c @@ -73,7 +73,7 @@ static void notify_guest_bh(void *opaque) unsigned i = j + ctzl(bits); VirtQueue *vq = virtio_get_queue(s->vdev, i); - virtio_notify_irqfd(s->vdev, vq); + virtio_notify(s->vdev, vq); bits &= bits - 1; /* clear right-most bit */ }