From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZgsj-0005R0-Hi for qemu-devel@nongnu.org; Tue, 07 May 2013 08:20:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZgsh-0006tn-VM for qemu-devel@nongnu.org; Tue, 07 May 2013 08:20:33 -0400 Received: from greensocs.com ([87.106.252.221]:39850 helo=s15328186.onlinehome-server.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZgsh-0006tL-Ps for qemu-devel@nongnu.org; Tue, 07 May 2013 08:20:31 -0400 Message-ID: <5188F189.7040102@greensocs.com> Date: Tue, 07 May 2013 14:20:25 +0200 From: =?ISO-8859-1?Q?KONRAD_Fr=E9d=E9ric?= MIME-Version: 1.0 References: <20130507102050.GA16836@redhat.com> In-Reply-To: <20130507102050.GA16836@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv2 for-1.5] virtio-pci: fix level interrupts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Peter Maydell , Paolo Bonzini , Anthony Liguori , qemu-devel@nongnu.org, Alexander Graf On 07/05/2013 12:20, 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 v1: > - rebase to master > > 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..c97aee1 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(d); I think there is a mistake here. VIRTIO_DEVICE_GET_CLASS(proxy->vdev) should be used. > 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; > } >