On Mon, Jan 20, 2025 at 01:57:36PM +0100, David Hildenbrand wrote: > > I don't want to overload those APIs, I prefer to see a new API that is > > just about splitting areas. Splitting is a special operation that can > > fail depending on driver support. > > So we'd just always perform a split-before-unmap. If split fails, we're in > trouble, just like we would be when unmap would fail. > > If the split succeeded, the unmap will succeed *and* be atomic. > > That sounds reasonable to me and virtio-mem could benefit from that as well. Yeah, we just went through removing implicit split on unmap behaviors from the code in iommu and I think it was a mistake that existed at all. Very few places even want/expect to do split. Instead we ended up with this situation where it was hard to tell who was even using it, if at all. Turned out nobody used it. So I'd like the very special behavior marked out in code. If performance is a concern I'd prefer to see split gain a auto-unmap option. Jason