mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
virtio: unify dataplane and non-dataplane ->handle_output()
Now that virtio-blk and virtio-scsi are ready, get rid of the handle_aio_output() callback. It's no longer needed. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Message-id: 20211207132336.36627-7-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
d6fbfe2b83
commit
db608fb784
4 changed files with 26 additions and 80 deletions
|
@ -3525,23 +3525,23 @@ static void virtio_queue_host_notifier_aio_poll_end(EventNotifier *n)
|
|||
virtio_queue_set_notification(vq, 1);
|
||||
}
|
||||
|
||||
void virtio_queue_aio_set_host_notifier_handler(VirtQueue *vq, AioContext *ctx,
|
||||
VirtIOHandleOutput handle_output)
|
||||
void virtio_queue_aio_attach_host_notifier(VirtQueue *vq, AioContext *ctx)
|
||||
{
|
||||
if (handle_output) {
|
||||
aio_set_event_notifier(ctx, &vq->host_notifier, true,
|
||||
virtio_queue_host_notifier_read,
|
||||
virtio_queue_host_notifier_aio_poll,
|
||||
virtio_queue_host_notifier_aio_poll_ready);
|
||||
aio_set_event_notifier_poll(ctx, &vq->host_notifier,
|
||||
virtio_queue_host_notifier_aio_poll_begin,
|
||||
virtio_queue_host_notifier_aio_poll_end);
|
||||
} else {
|
||||
aio_set_event_notifier(ctx, &vq->host_notifier, true, NULL, NULL, NULL);
|
||||
/* Test and clear notifier before after disabling event,
|
||||
* in case poll callback didn't have time to run. */
|
||||
virtio_queue_host_notifier_read(&vq->host_notifier);
|
||||
}
|
||||
aio_set_event_notifier(ctx, &vq->host_notifier, true,
|
||||
virtio_queue_host_notifier_read,
|
||||
virtio_queue_host_notifier_aio_poll,
|
||||
virtio_queue_host_notifier_aio_poll_ready);
|
||||
aio_set_event_notifier_poll(ctx, &vq->host_notifier,
|
||||
virtio_queue_host_notifier_aio_poll_begin,
|
||||
virtio_queue_host_notifier_aio_poll_end);
|
||||
}
|
||||
|
||||
void virtio_queue_aio_detach_host_notifier(VirtQueue *vq, AioContext *ctx)
|
||||
{
|
||||
aio_set_event_notifier(ctx, &vq->host_notifier, true, NULL, NULL, NULL);
|
||||
/* Test and clear notifier before after disabling event,
|
||||
* in case poll callback didn't have time to run. */
|
||||
virtio_queue_host_notifier_read(&vq->host_notifier);
|
||||
}
|
||||
|
||||
void virtio_queue_host_notifier_read(EventNotifier *n)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue