qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 for-2.6 3/5] virtio: Mark host notifiers as e


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v3 for-2.6 3/5] virtio: Mark host notifiers as external
Date: Mon, 9 May 2016 14:19:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1


On 22/04/2016 15:53, Fam Zheng wrote:
> The effect of this change is the block layer drained section can work,
> for example when mirror job is being completed.
> 
> Signed-off-by: Fam Zheng <address@hidden>

For 2.7 I think we should do something else: make non-dataplane
virtio-{blk,scsi} use the same code path as dataplane, including usage
of virtio_queue_aio_set_host_notifier_handler.

The virtio-blk/virtio-scsi ioeventfd can then be added to
qemu_get_aio_context() and patch 5 can go (possibly some of the
dependencies too).

For 2.6 however this was fine.

Thanks,

Paolo

> ---
>  hw/virtio/virtio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> index fffa09f..30ede3d 100644
> --- a/hw/virtio/virtio.c
> +++ b/hw/virtio/virtio.c
> @@ -1829,10 +1829,10 @@ void 
> virtio_queue_set_host_notifier_fd_handler(VirtQueue *vq, bool assign,
>                                                 bool set_handler)
>  {
>      if (assign && set_handler) {
> -        event_notifier_set_handler(&vq->host_notifier, false,
> +        event_notifier_set_handler(&vq->host_notifier, true,
>                                     virtio_queue_host_notifier_read);
>      } else {
> -        event_notifier_set_handler(&vq->host_notifier, false, NULL);
> +        event_notifier_set_handler(&vq->host_notifier, true, NULL);
>      }
>      if (!assign) {
>          /* Test and clear notifier before after disabling event,
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]