On Wed, Jul 17, 2024 at 01:31:54PM -0300, Jason Gunthorpe wrote: > On Wed, Jul 17, 2024 at 12:30:19PM -0400, Peter Xu wrote: > > On Wed, Jul 17, 2024 at 04:17:12PM +0200, David Hildenbrand wrote: > > > I'd be curious how a previous truncation on a file can tear down a PFNMAP > > > mapping -- and if there are simple ways to forbid that (if possible). > > > > Unfortunately, forbiding it may not work for vfio, as vfio would like to > > allow none (or partial) mapping on the bars.. at least so far that's the > > plan. > > vfio doesn't support truncation? Or does that means something else > here? Here I meant VFIO can explicitly zapping pgtables via vfio_pci_zap_bars(), irrelevant of any form of truncations. I suppose it'll have the same effect where we may need to stop assuming PFNMAP vmas will always have fully installed pgtables. Thanks, -- Peter Xu