[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/47] Revert "virtio: Introduce virtio_add_queue_aio
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 10/47] Revert "virtio: Introduce virtio_add_queue_aio" |
Date: |
Sun, 30 Oct 2016 23:23:48 +0200 |
From: Paolo Bonzini <address@hidden>
This reverts commit 872dd82c83745a603d2e07a03d34313eb6467ae4.
virtio_add_queue_aio is unused.
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/hw/virtio/virtio.h | 3 ---
hw/virtio/virtio.c | 38 ++++----------------------------------
2 files changed, 4 insertions(+), 37 deletions(-)
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 12292bb..2fcd23c 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -152,9 +152,6 @@ typedef void (*VirtIOHandleOutput)(VirtIODevice *,
VirtQueue *);
VirtQueue *virtio_add_queue(VirtIODevice *vdev, int queue_size,
VirtIOHandleOutput handle_output);
-VirtQueue *virtio_add_queue_aio(VirtIODevice *vdev, int queue_size,
- VirtIOHandleOutput handle_output);
-
void virtio_del_queue(VirtIODevice *vdev, int n);
void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned in_num);
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 138a644..5221aba 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -97,7 +97,6 @@ struct VirtQueue
uint16_t vector;
VirtIOHandleOutput handle_output;
VirtIOHandleOutput handle_aio_output;
- bool use_aio;
VirtIODevice *vdev;
EventNotifier guest_notifier;
EventNotifier host_notifier;
@@ -1287,9 +1286,8 @@ void virtio_queue_set_vector(VirtIODevice *vdev, int n,
uint16_t vector)
}
}
-static VirtQueue *virtio_add_queue_internal(VirtIODevice *vdev, int queue_size,
- VirtIOHandleOutput handle_output,
- bool use_aio)
+VirtQueue *virtio_add_queue(VirtIODevice *vdev, int queue_size,
+ VirtIOHandleOutput handle_output)
{
int i;
@@ -1306,28 +1304,10 @@ static VirtQueue
*virtio_add_queue_internal(VirtIODevice *vdev, int queue_size,
vdev->vq[i].vring.align = VIRTIO_PCI_VRING_ALIGN;
vdev->vq[i].handle_output = handle_output;
vdev->vq[i].handle_aio_output = NULL;
- vdev->vq[i].use_aio = use_aio;
return &vdev->vq[i];
}
-/* Add a virt queue and mark AIO.
- * An AIO queue will use the AioContext based event interface instead of the
- * default IOHandler and EventNotifier interface.
- */
-VirtQueue *virtio_add_queue_aio(VirtIODevice *vdev, int queue_size,
- VirtIOHandleOutput handle_output)
-{
- return virtio_add_queue_internal(vdev, queue_size, handle_output, true);
-}
-
-/* Add a normal virt queue (on the contrary to the AIO version above. */
-VirtQueue *virtio_add_queue(VirtIODevice *vdev, int queue_size,
- VirtIOHandleOutput handle_output)
-{
- return virtio_add_queue_internal(vdev, queue_size, handle_output, false);
-}
-
void virtio_del_queue(VirtIODevice *vdev, int n)
{
if (n < 0 || n >= VIRTIO_QUEUE_MAX) {
@@ -2073,21 +2053,11 @@ static void
virtio_queue_host_notifier_read(EventNotifier *n)
void virtio_queue_set_host_notifier_fd_handler(VirtQueue *vq, bool assign,
bool set_handler)
{
- AioContext *ctx = qemu_get_aio_context();
if (assign && set_handler) {
- if (vq->use_aio) {
- aio_set_event_notifier(ctx, &vq->host_notifier, true,
+ event_notifier_set_handler(&vq->host_notifier, true,
virtio_queue_host_notifier_read);
- } else {
- event_notifier_set_handler(&vq->host_notifier, true,
- virtio_queue_host_notifier_read);
- }
} else {
- if (vq->use_aio) {
- aio_set_event_notifier(ctx, &vq->host_notifier, true, NULL);
- } else {
- event_notifier_set_handler(&vq->host_notifier, true, NULL);
- }
+ event_notifier_set_handler(&vq->host_notifier, true, NULL);
}
if (!assign) {
/* Test and clear notifier before after disabling event,
--
MST
- [Qemu-devel] [PULL 00/47] virtio, pc: fixes and features, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 01/47] virtio/migration: Add VMStateDescription to VirtioDeviceClass, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 02/47] virtio/migration: Migrate balloon to VMState, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 03/47] virtio: disable ioeventfd as early as possible, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 04/47] virtio: move ioeventfd_disabled flag to VirtioBusState, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 05/47] virtio: move ioeventfd_started flag to VirtioBusState, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 06/47] virtio: add start_ioeventfd and stop_ioeventfd to VirtioDeviceClass, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 07/47] virtio: introduce virtio_device_ioeventfd_enabled, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 09/47] virtio-scsi: always use dataplane path if ioeventfd is active, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 08/47] virtio-blk: always use dataplane path if ioeventfd is active, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 10/47] Revert "virtio: Introduce virtio_add_queue_aio",
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 11/47] virtio: remove set_handler argument from set_host_notifier_internal, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 12/47] virtio: remove ioeventfd_disabled altogether, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 13/47] virtio: use virtio_bus_set_host_notifier to start/stop ioeventfd, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 14/47] virtio: inline virtio_queue_set_host_notifier_fd_handler, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 15/47] virtio: inline set_host_notifier_internal, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 16/47] cryptodev: introduce cryptodev backend interface, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 17/47] cryptodev: add symmetric algorithm operation stuff, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 18/47] virtio-crypto: introduce virtio_crypto.h, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 19/47] cryptodev: introduce a new cryptodev backend, Michael S. Tsirkin, 2016/10/30
- [Qemu-devel] [PULL 20/47] virtio-crypto: add virtio crypto device emulation, Michael S. Tsirkin, 2016/10/30