[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-1.5] virtio-pci: bugfix

From: KONRAD Frédéric
Subject: Re: [Qemu-devel] [PATCH for-1.5] virtio-pci: bugfix
Date: Tue, 07 May 2013 11:28:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

On 06/05/2013 22:51, Anthony Liguori wrote:
"Michael S. Tsirkin" <address@hidden> 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 <address@hidden>
Tested-by: Alexander Graf <address@hidden>
/home/aliguori/git/qemu/hw/virtio/virtio-pci.c: In function 
/home/aliguori/git/qemu/hw/virtio/virtio-pci.c:761:54: error: ‘VirtIODevice’ 
has no member named ‘guest_notifier_mask’
/home/aliguori/git/qemu/hw/virtio/virtio-pci.c:762:20: error: ‘VirtIODevice’ 
has no member named ‘guest_notifier_mask’
   CC    hw/virtio/dataplane/hostmem.o
make: *** [hw/virtio/virtio-pci.o] Error 1


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(DeviceState *d, 
int n, bool assign,
+ if (!msix_enabled(&proxy->pci_dev) && proxy->vdev->guest_notifier_mask) {
+        proxy->vdev->guest_notifier_mask(proxy->vdev, n, !assign);
+    }
      return 0;
You need to use, VirtioDeviceClass to use guest_notifier_mask:

    VirtIODevice *vdev = proxy->vdev;
    VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);


    if (!msix_enabled(&proxy->pci_dev) && k->guest_notifier_mask) {
        k->guest_notifier_mask(vdev, n, !assign);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]