qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: 张磊强 <leiqzhang@gmail.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH] virtio-pci: pass real with_irqfd to virtio_pci_set_guest_notifier()
Date: Wed, 27 Mar 2013 16:41:12 +0100	[thread overview]
Message-ID: <1364398872-3912-1-git-send-email-stefanha@redhat.com> (raw)

virtio_pci_set_guest_notifiers() checks whether irqfd can be used and
whether MSI-X is enabled for the PCI adapter.  But then it calls
virtio_pci_set_guest_notifier() and passes kvm_msi_via_irqfd_enabled()
instead of with_irqfd.

When MSI-X is disabled but irqfd is allowed this means that
guest_notifier has neither irqfd nor a
virtio_queue_guest_notifier_read() handler.  Therefore the guest cannot
receive notifications.

This issue is triggered by a Windows 7 Professional 64-bit guest with
-device virtio-blk-pci,x-data-plane=on.  The guest driver does not
enable MSI-X and the guest gets stuck at the Windows boot screen since
it does not receive notifications.

Reported-by: 张磊强 (Leiqiang Zhang) <leiqzhang@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/virtio-pci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 736a9bf..84ece51 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -798,8 +798,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.8.1.4

                 reply	other threads:[~2013-03-27 15:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1364398872-3912-1-git-send-email-stefanha@redhat.com \
    --to=stefanha@redhat.com \
    --cc=leiqzhang@gmail.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).