[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] virtio: Register host notifier handler as exter

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] virtio: Register host notifier handler as external
Date: Mon, 9 May 2016 14:32:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1

On 21/04/2016 16:28, Fam Zheng wrote:
>> > Is this the right thing to do in all cases?
>> > E.g. it doesn't look like event_notifier_set_handler previously called
>> > aio_set_event_notifier on win32. Was there a reason for this?
> It's a good catch. I'm not sure whether/how win32 goes with ioeventfd

Fam's patch is okay.  While POSIX has only file descriptors, Windows has
socket descriptors and handles.  EventNotifier is a handle, so it must
use aio_set_event_notifier or qemu_add_wait_object.

Fam changed qemu_add_wait_object to the corresponding AioContext-based

qemu_add_wait_object and qemu_del_wait_object probably should go away,
replaced by a new function aio_set_wait_handler.  Windows's
aio_set_event_notifier then can simply become

    aio_set_wait_handler(ctx, event_notifier_get_handle(e), is_external,
                         io_notify, e);

similar to how POSIX implements it with

    aio_set_fd_handler(ctx, event_notifier_get_fd(e),
                       is_external, (IOHandler *)io_read, NULL, e);



> , but it
> seems all the existing host notifier handling (fd handler) in vhost and data
> plane mismatch with the event notifier implementation (WaitObject) in win32.
> This is a subject understood best by Paolo but since he's on PTO I'll see if I
> can figure out the answer by testing this code with wine.

reply via email to

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