On Tue, Apr 08, 2025 at 01:23:33PM -0600, Alex Williamson wrote: > > Remove vfio_test_domain_fgsp() and just rely on a direct 2*PAGE_SIZE check > > instead so there is no behavior change. > > > > Maybe it should always activate the iommu_iova_to_phys(), it shouldn't > > have a performance downside since split is gone. > > We were never looking for splitting here, in fact an IOMMU driver that > supports splitting would break the fgsp test. Yes, I thought that was the point as expensive splitting in the driver would be the main reason not to use the unmap path. > Nor was the intent ever to look for 2*PAGE_SIZE support. Maybe, but that is what it ended up doing :) > I don't recall the optimization being overwhelming in the first place, > so if it's relegated to AMD v1 maybe we should just remove it > altogether rather than introducing this confusing notion that > 2*PAGE_SIZE has some particular importance. Okay, lets do that instead. We have more and more cases where we can get smaller orders than 2M now and the iova loop is probably going to be faster than unmapping a small order page 4k at a time. Only AMDv1 has the ability to store the arbitary orders.. Jason