On Mon, Sep 23, 2024 at 11:52:19PM +0000, Tian, Kevin wrote: > > IMHO we should try to do as best we can here, and the ideal interface > > would be a notifier to switch the shared/private pages in some portion > > of the guestmemfd. With the idea that iommufd could perhaps do it > > atomically. > > yes atomic replacement is necessary here, as there might be in-fly > DMAs to pages adjacent to the one being converted in the same > 1G hunk. Unmap/remap could potentially break it. Yeah.. This integration is going to be much more complicated than I originally thought about. It will need the generic pt stuff as the hitless page table manipulations we are contemplating here are pretty complex. Jason