[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH-RFC 06/13] s390-virtio: fill in irqfd support
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PATCH-RFC 06/13] s390-virtio: fill in irqfd support |
Date: |
Mon, 11 Jan 2010 19:20:43 +0200 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
Don't know how to make queuefd work: probably need support for binding
hypercalls to eventfd in kvm? Again, just a demonstration, probably not
for commit, because s390 does not have vector support.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/s390-virtio-bus.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
index 980e7eb..b663972 100644
--- a/hw/s390-virtio-bus.c
+++ b/hw/s390-virtio-bus.c
@@ -315,11 +315,27 @@ static unsigned virtio_s390_get_features(void *opaque)
return dev->host_features;
}
+static void virtio_s390_irqfd_read(void *opaque)
+{
+ VirtQueue *vq = opaque;
+ virtio_irq(vq->vdev, vq);
+}
+
+static int virtio_s390_irqfd(void * opaque, int n, int fd, bool assign)
+{
+ VirtIOS390Device *dev = opaque;
+ VirtQueue *vq = &dev->vdev->vq[n];
+
+ qemu_set_fd_handler(fd, assign ? virtio_s390_irqfd_read : NULL, NULL, vq);
+ return 0;
+}
+
/**************** S390 Virtio Bus Device Descriptions *******************/
static const VirtIOBindings virtio_s390_bindings = {
.notify = virtio_s390_notify,
.get_features = virtio_s390_get_features,
+ .set_irqfd = virtio_s390_irqfd,
};
static VirtIOS390DeviceInfo s390_virtio_net = {
--
1.6.6.rc1.43.gf55cc
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH-RFC 06/13] s390-virtio: fill in irqfd support,
Michael S. Tsirkin <=