[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 1/7] virtio-bus: Drop "set_handler" parameter
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v2 1/7] virtio-bus: Drop "set_handler" parameter |
Date: |
Fri, 24 Jun 2016 20:39:28 +0800 |
It always equals to assign now.
Signed-off-by: Fam Zheng <address@hidden>
---
hw/virtio/virtio-bus.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c
index 1313760..f34b4fc 100644
--- a/hw/virtio/virtio-bus.c
+++ b/hw/virtio/virtio-bus.c
@@ -150,10 +150,9 @@ void virtio_bus_set_vdev_config(VirtioBusState *bus,
uint8_t *config)
* This function handles both assigning the ioeventfd handler and
* registering it with the kernel.
* assign: register/deregister ioeventfd with the kernel
- * set_handler: use the generic ioeventfd handler
*/
static int set_host_notifier_internal(DeviceState *proxy, VirtioBusState *bus,
- int n, bool assign, bool set_handler)
+ int n, bool assign)
{
VirtIODevice *vdev = virtio_bus_get_device(bus);
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(bus);
@@ -167,7 +166,7 @@ static int set_host_notifier_internal(DeviceState *proxy,
VirtioBusState *bus,
error_report("%s: unable to init event notifier: %d", __func__, r);
return r;
}
- virtio_queue_set_host_notifier_fd_handler(vq, true, set_handler);
+ virtio_queue_set_host_notifier_fd_handler(vq, true, true);
r = k->ioeventfd_assign(proxy, notifier, n, assign);
if (r < 0) {
error_report("%s: unable to assign ioeventfd: %d", __func__, r);
@@ -201,7 +200,7 @@ void virtio_bus_start_ioeventfd(VirtioBusState *bus)
if (!virtio_queue_get_num(vdev, n)) {
continue;
}
- r = set_host_notifier_internal(proxy, bus, n, true, true);
+ r = set_host_notifier_internal(proxy, bus, n, true);
if (r < 0) {
goto assign_error;
}
@@ -215,7 +214,7 @@ assign_error:
continue;
}
- r = set_host_notifier_internal(proxy, bus, n, false, false);
+ r = set_host_notifier_internal(proxy, bus, n, false);
assert(r >= 0);
}
k->ioeventfd_set_started(proxy, false, true);
@@ -237,7 +236,7 @@ void virtio_bus_stop_ioeventfd(VirtioBusState *bus)
if (!virtio_queue_get_num(vdev, n)) {
continue;
}
- r = set_host_notifier_internal(proxy, bus, n, false, false);
+ r = set_host_notifier_internal(proxy, bus, n, false);
assert(r >= 0);
}
k->ioeventfd_set_started(proxy, false, false);
--
2.8.3
- [Qemu-devel] [PATCH v2 0/7] virtio: Merge virtio-{blk, scsi} host notifier handling paths, Fam Zheng, 2016/06/24
- [Qemu-devel] [PATCH v2 1/7] virtio-bus: Drop "set_handler" parameter,
Fam Zheng <=
- [Qemu-devel] [PATCH v2 4/7] virtio: Use aio_set_event_notifier for aio vq, Fam Zheng, 2016/06/24
- [Qemu-devel] [PATCH v2 2/7] virtio: Add typedef for handle_output, Fam Zheng, 2016/06/24
- [Qemu-devel] [PATCH v2 3/7] virtio: Introduce virtio_add_queue_aio, Fam Zheng, 2016/06/24
- [Qemu-devel] [PATCH v2 6/7] virtio-scsi: Call virtio_add_queue_aio, Fam Zheng, 2016/06/24
- [Qemu-devel] [PATCH v2 5/7] virtio-blk: Call virtio_add_queue_aio, Fam Zheng, 2016/06/24