On 5/24/20 3:40 PM, Peter Maydell wrote: > On Sun, 24 May 2020 at 11:30, Philippe Mathieu-Daudé <phi...@redhat.com> > wrote: >> It looks to me a normal behavior for a DMA device. DMA devices have a >> different address space view than the CPUs. >> Also note the fw_cfg is a generic device, not restricted to the x86 arch. > > In an ideal world all our DMA devices would use some kind of common > framework or design pattern so they didn't hog all the CPU > and/or spend minutes with the BQL held if the guest requests > an enormous-sized DMA. In practice many of them just have > a simple "loop until the DMA transfer is complete" implementation...
Is this framework already implemented in the hidden dma-helpers.c? Apparently this file was written for BlockBackend, but the code seems rather generic.