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

[PATCH 4/5] VT-d: restrict iommu_flush_all() to cache writeback


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 19 Apr 2023 12:46:21 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; 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=tq9WHKGqRr1z/PValrjLOh415pqYopf5CMM1Py5K+Iw=; b=NwHfGoCRIHh3pURNKg2sXz5jlvVPWcKrwTuM2vrKsKU6P6JTaeKslJGmfYnDdhkEr3I2UqNnlx9fpED7quBExRlAA3bnG8zLXaT248TerrSxEUH1VUCq2OHzc7LShM7ljq66mDpZ3xhkoyVA1nWHgUmS0qW7fl2Nr0FcsAjH6mcc54/VnWbleS6yxw1k2XHuo42Lb6NY2qyUsqJky2vnXjJML3MywCsDY8liqx3/HO2Ws91vnbpNSypHkPr4wSRbC4FyXKRngUokgCyg4itznc7t/niZc2k1tynstiGNqbXWmoBiR9LZFa0B0h8M5vMqGfMEKlqZO1DdrERq6x6WGA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iZHNvWxjZhlshU9FWzDmjFI4NCjQyVdHO4eLwswL7ROeDq9qxakyyvzc5dvg4d6oxutn+8gplwj/9JkVgrpKmsm0aYCVB38XkAJ2KU0jBxIe1l3PM39iIqDmuj8rq6kIH/10lGYVChY734k5dMacRP2XsH17rABEBIsdZpVBJf22ToMYpRDkGzVWSFMVQBie5tT69r+Fhuoou101TmrWYO+oEk5iYjBhhhZAX9Nd1GsugV1L5ab2VgbMzOMxTFskWzD56ko7sbGsqjIm6jEpJiAcuuTLc2KieN62BgBuRxZqDC14wT+e6/wBTYeu/2Iz2nYfs80RTVrGoMyoPch8nA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Wed, 19 Apr 2023 10:46:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

We don't need to invalidate caches here; all we're after is that earlier
writes have made it to main memory (and aiui even that just in case).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
This, aiui, being an analogue to uses of iommu_sync_cache() (just not
range restricted), I wonder whether it shouldn't be conditional upon
iommu_non_coherent. Then again I'm vaguely under the impression that
we had been here before, possibly even as far as questioning the need
for this call altogether.

--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -693,7 +693,7 @@ static int __must_check iommu_flush_all(
     bool_t flush_dev_iotlb;
     int rc = 0;
 
-    flush_local(FLUSH_CACHE);
+    flush_local(FLUSH_WRITEBACK);
 
     for_each_drhd_unit ( drhd )
     {




 


Rackspace

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