mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-08 03:48:15 +00:00
virtio-pci: fix level interrupts
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 <mst@redhat.com> Tested-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
d551d220c9
commit
62c96360ae
@ -744,6 +744,7 @@ static int virtio_pci_set_guest_notifier(DeviceState *d, int n, bool assign,
|
|||||||
bool with_irqfd)
|
bool with_irqfd)
|
||||||
{
|
{
|
||||||
VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d);
|
VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d);
|
||||||
|
VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(proxy->vdev);
|
||||||
VirtQueue *vq = virtio_get_queue(proxy->vdev, n);
|
VirtQueue *vq = virtio_get_queue(proxy->vdev, n);
|
||||||
EventNotifier *notifier = virtio_queue_get_guest_notifier(vq);
|
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);
|
event_notifier_cleanup(notifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!msix_enabled(&proxy->pci_dev) && vdc->guest_notifier_mask) {
|
||||||
|
vdc->guest_notifier_mask(proxy->vdev, n, !assign);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user