Blob Blame History Raw
From d52f76a894c5a6663ffbee71e020069a86a52989 Mon Sep 17 00:00:00 2001
Message-Id: <d52f76a894c5a6663ffbee71e020069a86a52989.1387385113.git.minovotn@redhat.com>
From: Stefan Hajnoczi <stefanha@redhat.com>
Date: Wed, 11 Dec 2013 09:55:07 +0100
Subject: [PATCH] virtio_pci: fix level interrupts with irqfd

RH-Author: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: <1386755707-8033-1-git-send-email-stefanha@redhat.com>
Patchwork-id: 56157
O-Subject: [RHEL7 qemu-kvm PATCH] virtio_pci: fix level interrupts with irqfd
Bugzilla: 1035132
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>

From: "Michael S. Tsirkin" <mst@redhat.com>

BZ: 1035132
BZ: 1035150
Brew: https://brewweb.devel.redhat.com/taskinfo?taskID=6700088
Upstream: merged

commit 62c96360ae7f2c7a8b029277fbb7cb082fdef7fd
    virtio-pci: fix level interrupts
only helps systems without irqfd: on systems with irqfd support we
passed in flag requesting irqfd even when msix is disabled.

As a result, for level interrupts we didn't install an fd handler so
unmasking an fd had no effect.

Fix this up.

Cc: qemu-stable@nongnu.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 23fe2b3f9e7df8da53ac1bc32c6875254911d7f4)
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/virtio/virtio-pci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 hw/virtio/virtio-pci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index ba8848f..6f5c434 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -805,8 +805,7 @@ static int virtio_pci_set_guest_notifiers(DeviceState *d, int nvqs, bool assign)
             break;
         }
 
-        r = virtio_pci_set_guest_notifier(d, n, assign,
-                                          kvm_msi_via_irqfd_enabled());
+        r = virtio_pci_set_guest_notifier(d, n, assign, with_irqfd);
         if (r < 0) {
             goto assign_error;
         }
-- 
1.7.11.7