From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ua9BN-0002uv-It for qemu-devel@nongnu.org; Wed, 08 May 2013 14:33:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ua9BJ-0006y3-Tc for qemu-devel@nongnu.org; Wed, 08 May 2013 14:33:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ua97T-00060e-5O for qemu-devel@nongnu.org; Wed, 08 May 2013 14:29:39 -0400 Date: Wed, 8 May 2013 21:29:29 +0300 From: "Michael S. Tsirkin" Message-ID: <20130508182929.GA10767@redhat.com> References: <20130507124958.GA21660@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130507124958.GA21660@redhat.com> Subject: Re: [Qemu-devel] [PATCHv3 for-1.5] virtio-pci: fix level interrupts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Paolo Bonzini , Anthony Liguori , KONRAD Frederic On Tue, May 07, 2013 at 03:49:58PM +0300, Michael S. Tsirkin wrote: > mask notifiers are never called without msix, > so devices with backend masking like vhost don't work. > Call mask notifiers explicitly at > startup/cleanup to make it work. > > Signed-off-by: Michael S. Tsirkin > Tested-by: Alexander Graf > --- > > changes from v2: > fix bug spotted by Konrad > changes from v1: > rebased to master > > I'm guessing this missed 1.5. Added for-1.5 just in > case - probably should go into 1.5.1. Not sure I made this clear. If we can put it in 1.5 great, if not it must go into stable branch. > hw/virtio/virtio-pci.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c > index d8708c1..195ee04 100644 > --- a/hw/virtio/virtio-pci.c > +++ b/hw/virtio/virtio-pci.c > @@ -744,6 +744,7 @@ static int virtio_pci_set_guest_notifier(DeviceState *d, int n, bool assign, > bool with_irqfd) > { > VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d); > + VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(proxy->vdev); > VirtQueue *vq = virtio_get_queue(proxy->vdev, n); > EventNotifier *notifier = virtio_queue_get_guest_notifier(vq); > > @@ -758,6 +759,10 @@ static int virtio_pci_set_guest_notifier(DeviceState *d, int n, bool assign, > event_notifier_cleanup(notifier); > } > > + if (!msix_enabled(&proxy->pci_dev) && vdc->guest_notifier_mask) { > + vdc->guest_notifier_mask(proxy->vdev, n, !assign); > + } > + > return 0; > } > > -- > MST