From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZeC1-0004HQ-RR for qemu-devel@nongnu.org; Tue, 07 May 2013 05:28:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZeBx-0007Tl-1M for qemu-devel@nongnu.org; Tue, 07 May 2013 05:28:17 -0400 Received: from greensocs.com ([87.106.252.221]:39998 helo=s15328186.onlinehome-server.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZeBw-0007Sx-QL for qemu-devel@nongnu.org; Tue, 07 May 2013 05:28:12 -0400 Message-ID: <5188C926.2060400@greensocs.com> Date: Tue, 07 May 2013 11:28:06 +0200 From: =?UTF-8?B?S09OUkFEIEZyw6lkw6lyaWM=?= MIME-Version: 1.0 References: <20130506150027.GA22689@redhat.com> <87sj1zvnlm.fsf@codemonkey.ws> In-Reply-To: <87sj1zvnlm.fsf@codemonkey.ws> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-1.5] virtio-pci: bugfix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Paolo Bonzini , Anthony Liguori , qemu-devel@nongnu.org, Peter Maydell On 06/05/2013 22:51, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > >> 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 > /home/aliguori/git/qemu/hw/virtio/virtio-pci.c: In function =E2=80=98vi= rtio_pci_set_guest_notifier=E2=80=99: > /home/aliguori/git/qemu/hw/virtio/virtio-pci.c:761:54: error: =E2=80=98= VirtIODevice=E2=80=99 has no member named =E2=80=98guest_notifier_mask=E2= =80=99 > /home/aliguori/git/qemu/hw/virtio/virtio-pci.c:762:20: error: =E2=80=98= VirtIODevice=E2=80=99 has no member named =E2=80=98guest_notifier_mask=E2= =80=99 > CC hw/virtio/dataplane/hostmem.o > make: *** [hw/virtio/virtio-pci.o] Error 1 > > Regards, > > Anthony Liguori > >> --- >> hw/virtio/virtio-pci.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c >> index 8bba0f3..d0fcc6c 100644 >> --- a/hw/virtio/virtio-pci.c >> +++ b/hw/virtio/virtio-pci.c >> @@ -758,6 +758,10 @@ static int virtio_pci_set_guest_notifier(DeviceSt= ate *d, int n, bool assign, >> event_notifier_cleanup(notifier); >> } >> =20 >> + if (!msix_enabled(&proxy->pci_dev) && proxy->vdev->guest_notifier= _mask) { >> + proxy->vdev->guest_notifier_mask(proxy->vdev, n, !assign); >> + } >> + >> return 0; >> } >> =20 >> --=20 >> MST You need to use, VirtioDeviceClass to use guest_notifier_mask: VirtIODevice *vdev =3D proxy->vdev; VirtioDeviceClass *k =3D VIRTIO_DEVICE_GET_CLASS(vdev); then: if (!msix_enabled(&proxy->pci_dev) && k->guest_notifier_mask) { k->guest_notifier_mask(vdev, n, !assign); } Fred