> From: Jan Beulich > Sent: Thursday, January 27, 2022 10:49 PM > > Let's use infrastructure we have available instead of an open-coded > wbinvd() invocation. > > Signed-off-by: Jan Beulich <jbeul...@suse.com>
Reviewed-by: Kevin Tian <kevin.t...@intel.com> > > --- a/xen/drivers/passthrough/vtd/extern.h > +++ b/xen/drivers/passthrough/vtd/extern.h > @@ -78,8 +78,6 @@ int __must_check qinval_device_iotlb_syn > struct pci_dev *pdev, > u16 did, u16 size, u64 addr); > > -void flush_all_cache(void); > - > uint64_t alloc_pgtable_maddr(unsigned long npages, nodeid_t node); > void free_pgtable_maddr(u64 maddr); > void *map_vtd_domain_page(u64 maddr); > --- a/xen/drivers/passthrough/vtd/iommu.c > +++ b/xen/drivers/passthrough/vtd/iommu.c > @@ -623,7 +623,8 @@ static int __must_check iommu_flush_all( > bool_t flush_dev_iotlb; > int rc = 0; > > - flush_all_cache(); > + flush_local(FLUSH_CACHE); > + > for_each_drhd_unit ( drhd ) > { > int context_rc, iotlb_rc; > --- a/xen/drivers/passthrough/vtd/x86/vtd.c > +++ b/xen/drivers/passthrough/vtd/x86/vtd.c > @@ -46,8 +46,3 @@ void unmap_vtd_domain_page(const void *v > { > unmap_domain_page(va); > } > - > -void flush_all_cache() > -{ > - wbinvd(); > -} >