On 01.12.2021 14:02, Andrew Cooper wrote: > On 01/12/2021 09:41, Jan Beulich wrote: >> --- a/xen/drivers/passthrough/vtd/iommu.c >> +++ b/xen/drivers/passthrough/vtd/iommu.c >> @@ -591,7 +591,8 @@ static int __must_check iommu_flush_all( >> bool_t flush_dev_iotlb; >> int rc = 0; >> >> - flush_all_cache(); >> + flush_local(FLUSH_CACHE); > > While I agree that the conversion is an improvement, the logic still > looks totally bogus. > > I can believe that it might have been a stopgap to fix problems before > we identified the need for sync_cache() for non-coherent IOMMUs, but > there's no need I can spot for any WBINVDs on any of these paths. > > I'm fairly sure this should just be dropped, and Xen will get faster as > a result.
Kevin, thoughts? I have to admit I'm hesitant to remove such code, when there's no clear indication why it's there. I'm also not sure how much of a win the dropping would be, considering the places where this function gets called from. Jan