i8257: rewrite DMA_schedule to avoid hooking into the CPU loop
commit19d2b5e6ff7202c2bf45c547efa85ae6c2d76bbd
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Feb 2015 13:08:22 +0000 (16 14:08 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 Sep 2015 13:34:53 +0000 (9 15:34 +0200)
tree84d9d315b0307a886ee6df399c2450caf790bd23
parent5f5b5942d56a138baad0ae01458d5d0e62d5be68
i8257: rewrite DMA_schedule to avoid hooking into the CPU loop

The i8257 DMA controller uses an idle bottom half, which by default
does not cause the main loop to exit.  Therefore, the DMA_schedule
function is there to ensure that the CPU relinquishes the iothread
mutex to the iothread.

However, this is not enough since the iothread will call
aio_compute_timeout() and go to sleep again.  In the iothread
world, forcing execution of the idle bottom half is much simpler,
and only requires a call to qemu_notify_event().  Do it, removing
the need for the "cpu_request_exit" pseudo-irq.  The next patch
will remove it.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/block/fdc.c
hw/dma/i8257.c
hw/sparc/sun4m.c
hw/sparc64/sun4u.c
include/hw/isa/isa.h