On Thu, Nov 13, 2025 at 02:32:48PM +0100, Kevin Wolf wrote:
> Am 13.11.2025 um 09:27 hat Michael Tokarev geschrieben:
> > On 11/4/25 05:29, Stefan Hajnoczi wrote:
> > ..
> > > This patch series contains io_uring improvements:
> > > 
> > > 1. Support the glib event loop in fdmon-io_uring.
> > >     - aio-posix: fix race between io_uring CQE and AioHandler deletion
> > >     - aio-posix: keep polling enabled with fdmon-io_uring.c
> > >     - tests/unit: skip test-nested-aio-poll with io_uring
> > >     - aio-posix: integrate fdmon into glib event loop
> > > 
> > > 2. Enable fdmon-io_uring on hosts where io_uring is available at runtime.
> > >     Otherwise continue using ppoll(2) or epoll(7).
> > >     - aio: remove aio_context_use_g_source()
> > > 
> > > 3. Add the new aio_add_sqe() API for submitting io_uring requests in the 
> > > QEMU
> > >     event loop.
> > >     - aio: free AioContext when aio_context_new() fails
> > >     - aio: add errp argument to aio_context_setup()
> > >     - aio-posix: gracefully handle io_uring_queue_init() failure
> > >     - aio-posix: add aio_add_sqe() API for user-defined io_uring requests
> > >     - aio-posix: avoid EventNotifier for cqe_handler_bh
> > > 
> > > 4. Use aio_add_sqe() in block/io_uring.c instead of creating a dedicated
> > >     io_uring context for --blockdev aio=io_uring. This simplifies the 
> > > code,
> > >     reduces the number of file descriptors, and demonstrates the 
> > > aio_add_sqe()
> > >     API.
> > >     - block/io_uring: use aio_add_sqe()
> > >     - block/io_uring: use non-vectored read/write when possible
> > > 
> > > The highlight is aio_add_sqe(), which is needed for the FUSE-over-io_uring
> > > Google Summer of Code project and other future QEMU features that 
> > > natively use
> > > Linux io_uring functionality.
> > ..> Stefan Hajnoczi (15):
> > >    aio-posix: fix race between io_uring CQE and AioHandler deletion
> > >    aio-posix: fix fdmon-io_uring.c timeout stack variable lifetime
> > >    aio-posix: fix spurious return from ->wait() due to signals
> > >    aio-posix: keep polling enabled with fdmon-io_uring.c
> > >    tests/unit: skip test-nested-aio-poll with io_uring
> > >    aio-posix: integrate fdmon into glib event loop
> > >    aio: remove aio_context_use_g_source()
> > >    aio: free AioContext when aio_context_new() fails
> > >    aio: add errp argument to aio_context_setup()
> > >    aio-posix: gracefully handle io_uring_queue_init() failure
> > >    aio-posix: unindent fdmon_io_uring_destroy()
> > >    aio-posix: add fdmon_ops->dispatch()
> > >    aio-posix: add aio_add_sqe() API for user-defined io_uring requests
> > >    block/io_uring: use aio_add_sqe()
> > >    block/io_uring: use non-vectored read/write when possible
> > 
> > Is there anything in there which should go to qemu-stable?
> > 
> > From the descriptions of a few changes it feels like something should.
> 
> fdmon-io_uring has effectively been dead code since commit ba607ca (and
> until patch 7 in this series). The commit message of that commit makes
> it sounds like there are cases where GSource is not enabled, but there
> really aren't.
> 
> You may want to pick patch 2 anyway because it's a use after free and
> may effectively hang QEMU (by using far too large timeouts), but from
> what I can tell, without downstream code changes, you won't ever run
> this code in relevant stable releases. QEMU 5.0 was the only release
> that had it enabled before.

Right, the fixes are for dead code (until re-enabled by this patch
series). There is no practical benefit to backporting them.

Stefan

Attachment: signature.asc
Description: PGP signature

Reply via email to