Comment 3 for bug 1771042

Revision history for this message
Stefan Hajnoczi (stefanha) wrote : Re: [Qemu-devel] [Bug 1771042] Re: dataplane interrupt handler doesn't support msi

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 <email address hidden>. 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