dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone
Blob Blame History Raw
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

---

diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index e8e0d82..fd0c73f 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -404,6 +404,7 @@ static void virtio_pci_guest_notifier_read(void *opaque)
     }
 }
 
+#ifdef CONFIG_KVM
 static int virtio_pci_mask_notifier(PCIDevice *dev, unsigned vector,
                                     void *opaque, int masked)
 {
@@ -424,6 +425,7 @@ static int virtio_pci_mask_notifier(PCIDevice *dev, unsigned vector,
     }
     return 0;
 }
+#endif
 
 static int virtio_pci_guest_notifier(void *opaque, int n, bool assign)
 {
@@ -526,7 +528,9 @@ static void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev,
 
     proxy->pci_dev.config_write = virtio_write_config;
 
+#ifdef CONFIG_KVM
     proxy->pci_dev.msix_mask_notifier = virtio_pci_mask_notifier;
+#endif
 
     size = VIRTIO_PCI_REGION_SIZE(&proxy->pci_dev) + vdev->config_len;
     if (size & (size-1))