[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 3/4] VT-d: replace flush_all_cache()


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 27 Jan 2022 15:49:04 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fOd3RfnzHL4D+dtvfMnfEOwQW5XKehauO+k69wnLAEw=; b=kA8RgK2JTtCtBJvER5pC7crfGfyEwyRKja1zx2l82TvgK/L8Gpnc8eCGD//DxoBbHPeUHJnJYU5Qo+sbIWR7Qfc9LhjVqP7rbXKYpIplQhJbA0McqDyVfsqxg07BCDdewZP/Hk9xM1gQAI/YUO5glnG7dFe39tslGyyk+6fdjaO8yPoEBJeJsp/yn0odgGtj/cNIe7oaLvRf43c2JpRaaCYLvJeoVnT3xkXsZ8gv4NpbgIkMAkdQdrxtenM8ZQAKTBCRYbq3DJntmJZQ6az0i3OjPXTCbXohiHtb7tI1Stb2Ri9Vd0x9A0QEOUKNuygz7z9JWqVZ14mVgA9SN6+12g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YJ6PJYJgJkkACtdWpL/oCqimLZ/bYDJAGUwoyUG4mytY342cxzy7DMZGbJZyIfyxI4pdesJXZ8Y2mlucbJjOE/VFn8aQTy9QIaMHDVqk0caUuUC7M6wbwhX/Vp1t1jnMs6q3zHJOU/36fgi4dv0irH1Qe4FhQLZA9bb23CRc8soDGRfp1JA6ayEVNCTmTcMNoUfzxIqzO1z5ZxMY3/ACa7aPDF28YnUvOIVoIS9qN0hKNCxAnqzA5OTzM97CvhH1Tlal8im9KywniGWZTaavDyppTXaILR/jxBNZHwBuRs/ejnEPdVJnDRCYASS/tPmZWGG7YBVU74NPkpE1nlRB8w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Paul Durrant <paul@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Thu, 27 Jan 2022 14:49:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Let's use infrastructure we have available instead of an open-coded
wbinvd() invocation.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- 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();
-}




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.