Message ID | 2a39cb48-7d38-6d7e-0557-fd93d377a31b@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | (mainly) IOMMU hook adjustments | expand |
On 27/01/2022 14:49, Jan Beulich wrote: > Let's use infrastructure we have available instead of an open-coded > wbinvd() invocation. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Paul Durrant <paul@xen.org>
> 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 <jbeulich@suse.com> Reviewed-by: Kevin Tian <kevin.tian@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(); > -} >
--- 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(); -}
Let's use infrastructure we have available instead of an open-coded wbinvd() invocation. Signed-off-by: Jan Beulich <jbeulich@suse.com>