On Thu, 05/14 11:34, Fam Zheng wrote: > AioContext and iohandler share the same concept except that AioContext > is more generalized - it runs on an AioContext which could be on the > main thread or an iothread. Similar to the relation of qemu_bh_new and > aio_bh_new, the iohandler is the special case of AioContext which > happens to run on the main thread context. > > Previously the only mismatch is the presense of qemu_set_fd_handler2 > with the special "can_read" parameter which is not available in > AioContext interface, now the parameter is removed, let's unify the code > and make iohandler a wrapper. Meanwhile, change the function's return > type to void because it always returns 0. > > This also simplifies the main loop by removing the qemu_iohandler_fill > and qemu_iohandler_poll hooks. > > One tiny things is this also makes sigfd depends on the main loop > AioContext, so we have to move the call of qemu_signal_init() in after > creation of qemu_aio_context. > > Signed-off-by: Fam Zheng <f...@redhat.com>
Sorry, please skip this one for now (overlooked before sending), it's not safe to include iohandler fds in nested aio_poll, at least until the "device IO" op blocker patches are in. Fam