[Top][All Lists]
[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
- [Qemu-devel] [RFC 0/9] vhost-scsi: Add support for host virtualized target, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 1/9] notifier: add validity check and notify function, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 2/9] virtio-pci: support host notifiers in TCG mode, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 3/9] virtio-pci: check that event notification worked,
Nicholas A. Bellinger <=
- [Qemu-devel] [RFC 4/9] vhost: Pass device path to vhost_dev_init(), Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 5/9] virtio-scsi: Add wwpn and tgpt properties, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 6/9] virtio-scsi: Open and initialize /dev/vhost-scsi, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 7/9] virtio-scsi: Start/stop vhost, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 8/9] virtio-scsi: Set max_target=0 during vhost-scsi operation, Nicholas A. Bellinger, 2012/07/24
- [Qemu-devel] [RFC 9/9] vhost-scsi: add -vhost-scsi host device, Nicholas A. Bellinger, 2012/07/24