qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC 3/9] virtio-pci: check that event notification worked


From: Nicholas A. Bellinger
Subject: [Qemu-devel] [RFC 3/9] virtio-pci: check that event notification worked
Date: Tue, 24 Jul 2012 22:34:00 +0000

From: Stefan Hajnoczi <address@hidden>

For sanity assert that event notification succeeds.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Cc: Anthony Liguori <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Nicholas Bellinger <address@hidden>
---
 hw/virtio-pci.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 538eef4..0f0f766 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -261,8 +261,11 @@ static void virtio_pci_queue_notify(VirtIOPCIProxy *proxy, 
uint32_t n)
     vq = virtio_get_queue(proxy->vdev, n);
     notifier = virtio_queue_get_host_notifier(vq);
     if (event_notifier_valid(notifier)) {
+        int r;
+
         printf("notifying vq %u host notifier from userspace\n", n);
-        event_notifier_notify(notifier);
+        r = event_notifier_notify(notifier);
+        assert(r == 0);
     } else {
         virtio_queue_notify_vq(vq);
     }
-- 
1.7.2.5




reply via email to

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