Re: [PATCH v4 1/3] memory: prevent dma-reentracy issues

2023-01-25 Thread Alexander Bulekov
On 230120 1447, Peter Maydell wrote: > On Fri, 20 Jan 2023 at 14:42, Darren Kenny wrote: > > Generally, this looks good, but I do have a comment below... > > > > On Thursday, 2023-01-19 at 02:00:02 -05, Alexander Bulekov wrote: > > > Add a flag to the DeviceState, when a device is engaged in

Re: [PATCH v4 1/3] memory: prevent dma-reentracy issues

2023-01-25 Thread Stefan Hajnoczi
On Thu, Jan 19, 2023 at 02:03:06AM -0500, Alexander Bulekov wrote: > Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA. > This flag is set/checked prior to calling a device's MemoryRegion > handlers, and set when device code initiates DMA. The purpose of this > flag is to

Re: [PATCH v4 1/3] memory: prevent dma-reentracy issues

2023-01-20 Thread Peter Maydell
On Fri, 20 Jan 2023 at 14:42, Darren Kenny wrote: > Generally, this looks good, but I do have a comment below... > > On Thursday, 2023-01-19 at 02:00:02 -05, Alexander Bulekov wrote: > > Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA. > > This flag is set/checked prior to

Re: [PATCH v4 1/3] memory: prevent dma-reentracy issues

2023-01-20 Thread Darren Kenny
Hi Alex, Generally, this looks good, but I do have a comment below... On Thursday, 2023-01-19 at 02:00:02 -05, Alexander Bulekov wrote: > Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA. > This flag is set/checked prior to calling a device's MemoryRegion > handlers, and

[PATCH v4 1/3] memory: prevent dma-reentracy issues

2023-01-18 Thread Alexander Bulekov
Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA. This flag is set/checked prior to calling a device's MemoryRegion handlers, and set when device code initiates DMA. The purpose of this flag is to prevent two types of DMA-based reentrancy issues: 1.) mmio -> dma -> mmio

[PATCH v4 1/3] memory: prevent dma-reentracy issues

2023-01-18 Thread Alexander Bulekov
Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA. This flag is set/checked prior to calling a device's MemoryRegion handlers, and set when device code initiates DMA. The purpose of this flag is to prevent two types of DMA-based reentrancy issues: 1.) mmio -> dma -> mmio