> From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Thursday, March 24, 2022 9:46 PM > > On Thu, Mar 24, 2022 at 07:25:03AM +0000, Tian, Kevin wrote: > > > Based on that here is a quick tweak of the force-snoop part (not compiled). > > I liked your previous idea better, that IOMMU_CAP_CACHE_COHERENCY > started out OK but got weird. So lets fix it back to the way it was. > > How about this: > > https://github.com/jgunthorpe/linux/commits/intel_no_snoop > > b11c19a4b34c2a iommu: Move the Intel no-snoop control off of > IOMMU_CACHE > 5263947f9d5f36 vfio: Require that device support DMA cache coherence > eab4b381c64a30 iommu: Restore IOMMU_CAP_CACHE_COHERENCY to its > original meaning > 2752e12bed48f6 iommu: Replace uses of IOMMU_CAP_CACHE_COHERENCY > with dev_is_dma_coherent() > > If you like it could you take it from here? > this looks good to me except that the 2nd patch (eab4b381) should be the last one otherwise it affects bisect. and in that case the subject would be simply about removing the capability instead of restoring... let me find a box to verify it. Thanks Kevin