Re: [Qemu-devel] [PATCH] dma: Avoid reentrancy in DMA transfer handlers

2011-10-31 Thread Kevin Wolf
Am 31.10.2011 17:00, schrieb Kevin Wolf: > Am 31.10.2011 16:34, schrieb Paolo Bonzini: >> On 10/31/2011 03:46 PM, Kevin Wolf wrote: Hmm, I think you should set rearm = 1 to ensure the BH is run when ultimately you leave the sync read. Sorry for not spotting this before. >>> >>> I was a

Re: [Qemu-devel] [PATCH] dma: Avoid reentrancy in DMA transfer handlers

2011-10-31 Thread Kevin Wolf
Am 31.10.2011 16:34, schrieb Paolo Bonzini: > On 10/31/2011 03:46 PM, Kevin Wolf wrote: >>> Hmm, I think you should set rearm = 1 to ensure the BH is run when >>> ultimately you leave the sync read. Sorry for not spotting this before. >> >> I was about to agree, but in fact adding a rearm = 1; l

Re: [Qemu-devel] [PATCH] dma: Avoid reentrancy in DMA transfer handlers

2011-10-31 Thread Paolo Bonzini
On 10/31/2011 03:46 PM, Kevin Wolf wrote: > Hmm, I think you should set rearm = 1 to ensure the BH is run when > ultimately you leave the sync read. Sorry for not spotting this before. I was about to agree, but in fact adding a rearm = 1; line leads to crashes, whereas in the version I posted

Re: [Qemu-devel] [PATCH] dma: Avoid reentrancy in DMA transfer handlers

2011-10-31 Thread Kevin Wolf
Am 28.10.2011 18:35, schrieb Paolo Bonzini: > On 10/28/2011 04:18 PM, Kevin Wolf wrote: >> 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 hand

Re: [Qemu-devel] [PATCH] dma: Avoid reentrancy in DMA transfer handlers

2011-10-28 Thread Paolo Bonzini
On 10/28/2011 04:18 PM, Kevin Wolf wrote: 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 reentran

[Qemu-devel] [PATCH] dma: Avoid reentrancy in DMA transfer handlers

2011-10-28 Thread Kevin Wolf
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 wi