« Previous | Next » 

Revision acae6f1c

IDacae6f1c4c1dae1b7e059751347ca4225b01a391

Added by Kevin Wolf over 12 years ago

dma: Avoid reentrancy in DMA transfer handlers

With the conversion of the block layer to coroutines, bdrv_read/write
have changed to run a nested event loop that calls qemu_bh_poll.
Consequently a scheduled BH can be called while a DMA transfer handler
runs and this means that DMA_run becomes reentrant.

Devices haven't been designed to cope with that, so instead of running a
nested transfer handler just wait for the next invocation of the BH from the
main loop.

This fixes some problems with the floppy device.

Signed-off-by: Kevin Wolf <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences