[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 19/20] virtio: do not set is_external=true on host notifiers
From: |
Stefan Hajnoczi |
Subject: |
[PATCH v4 19/20] virtio: do not set is_external=true on host notifiers |
Date: |
Tue, 25 Apr 2023 13:27:15 -0400 |
Host notifiers can now use is_external=false since virtio-blk and
virtio-scsi no longer rely on is_external=true for drained sections.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
hw/virtio/virtio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 272d930721..9cdad7e550 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -3491,7 +3491,7 @@ static void
virtio_queue_host_notifier_aio_poll_end(EventNotifier *n)
void virtio_queue_aio_attach_host_notifier(VirtQueue *vq, AioContext *ctx)
{
- aio_set_event_notifier(ctx, &vq->host_notifier, true,
+ aio_set_event_notifier(ctx, &vq->host_notifier, false,
virtio_queue_host_notifier_read,
virtio_queue_host_notifier_aio_poll,
virtio_queue_host_notifier_aio_poll_ready);
@@ -3508,14 +3508,14 @@ void virtio_queue_aio_attach_host_notifier(VirtQueue
*vq, AioContext *ctx)
*/
void virtio_queue_aio_attach_host_notifier_no_poll(VirtQueue *vq, AioContext
*ctx)
{
- aio_set_event_notifier(ctx, &vq->host_notifier, true,
+ aio_set_event_notifier(ctx, &vq->host_notifier, false,
virtio_queue_host_notifier_read,
NULL, NULL);
}
void virtio_queue_aio_detach_host_notifier(VirtQueue *vq, AioContext *ctx)
{
- aio_set_event_notifier(ctx, &vq->host_notifier, true, NULL, NULL, NULL);
+ aio_set_event_notifier(ctx, &vq->host_notifier, false, 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);
--
2.39.2
- [PATCH v4 08/20] hw/xen: do not use aio_set_fd_handler(is_external=true) in xen_xenstore, (continued)
- [PATCH v4 08/20] hw/xen: do not use aio_set_fd_handler(is_external=true) in xen_xenstore, Stefan Hajnoczi, 2023/04/25
- [PATCH v4 09/20] block: add blk_in_drain() API, Stefan Hajnoczi, 2023/04/25
- [PATCH v4 11/20] xen-block: implement BlockDevOps->drained_begin(), Stefan Hajnoczi, 2023/04/25
- [PATCH v4 10/20] block: drain from main loop thread in bdrv_co_yield_to_drain(), Stefan Hajnoczi, 2023/04/25
- [PATCH v4 12/20] hw/xen: do not set is_external=true on evtchn fds, Stefan Hajnoczi, 2023/04/25
- [PATCH v4 13/20] block/export: rewrite vduse-blk drain code, Stefan Hajnoczi, 2023/04/25
- [PATCH v4 15/20] block/fuse: do not set is_external=true on FUSE fd, Stefan Hajnoczi, 2023/04/25
- [PATCH v4 16/20] virtio: make it possible to detach host notifier from any thread, Stefan Hajnoczi, 2023/04/25
- [PATCH v4 17/20] virtio-blk: implement BlockDevOps->drained_begin(), Stefan Hajnoczi, 2023/04/25
- [PATCH v4 18/20] virtio-scsi: implement BlockDevOps->drained_begin(), Stefan Hajnoczi, 2023/04/25
- [PATCH v4 19/20] virtio: do not set is_external=true on host notifiers,
Stefan Hajnoczi <=
- [PATCH v4 20/20] aio: remove aio_disable_external() API, Stefan Hajnoczi, 2023/04/25
- [PATCH v4 14/20] block/export: don't require AioContext lock around blk_exp_ref/unref(), Stefan Hajnoczi, 2023/04/25