On Thu, Apr 24, 2025 at 07:16:52PM +0200, Cédric Le Goater wrote: > > Having said that I'm OK with going back to just a simple boolean if you'd > > really > > prefer. > > yes. VFIO_DMA_UNMAP_FLAG_ALL is a kernel interface and we don't > need more than one flag today.
OK > > > Why not unmap the halves here instead of in the backends ? > > > > The whole point of the change is that right now the generic listener.c code > > has > > a workaround that is specific to one particular backend. > > It's due to the ARM IO space size AFAICT. > > > vfio-user doesn't have > > any need to unmap in halves and in fact *has* to pass an "unmap all" flag. > > OK. So this flag is a vfio-user requirement. Why can't we call > vfio_container_dma_unmap() twice from vfio_listener_region_del() ? Are you suggesting that the vfio-user backend - and the protocol - somehow accounts for the two unmaps and translates it back into an unmap all? How would that work? Surely it's very ugly indeed to embed a foible of the (old) vfio kernel interface into every backend. regards john