Skip to content
  • Kevin Wolf's avatar
    acae6f1c
    dma: Avoid reentrancy in DMA transfer handlers · acae6f1c
    Kevin Wolf authored
    
    
    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: default avatarKevin Wolf <kwolf@redhat.com>
    acae6f1c
    dma: Avoid reentrancy in DMA transfer handlers
    Kevin Wolf authored
    
    
    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: default avatarKevin Wolf <kwolf@redhat.com>
Loading