On Tue, Jul 23, 2013 at 02:21:03PM +0200, Benoît Canet wrote: > The throttling code was segfaulting since commit > 02ffb504485f0920cfc75a0982a602f824a9a4f4 because some qemu_co_queue_next > caller > does not run in a coroutine. > qemu_co_queue_do_restart assume that the caller is a coroutinne. > As sugested by Stefan fix this by entering the coroutine directly.
Please mark qemu_co_queue_next() and qemu_co_queue_restart_all() coroutine_fn. They may only be called from coroutine context. Also please add assert(qemu_in_coroutine()) to these functions so an assertion fires when they are used incorrectly.