[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/4] VT-d: replace flush_all_cache()
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 1 Dec 2021 10:41:13 +0100
- 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=YQb8+AjKpTlqHxQEbPICVBl2jBxSIOPQK4afq3ep8dk=; b=gynYJcla0lZVDrhK7UGm7GJYTZ+pRvk0SzVH6tvyjPHVS7+tBKORaZc53gQnGBY0gD+oBPXz22APCfKt1V+rLeZmiKmDsk/MKE47xKiTmkFLiN99eYNThK8fPZgqLvmYf3f5JRvsuHIeHagDFLajDkYeNOM6Kov+b1bjPQxHqAIaKh0F7NIR1yTLI5DrcbYDPCbUGM91Uearx/tOHwrAkKb/XDsoHsTqoxWt+83COGM5M5q5J+LEw8EhsYF05n3kaug1BMQB5WZPkWWdslbEfo5TjQfA/mR7g0bJ3iEQJbDyuGAutpcC2UiDP0TCF2V/tnchAkkiijCz6qjPvXYE8A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lfoVbzO/ko4dBRljbNZGMp63s2JkDVV+D3nzcuABMVdpmMbCiXb5Ol1VqiDOSRGni2Kn5ShQ2tsxwEmq+EK6DQab6MP/dl8fGLBznyRO/peGaT2HjlZ4txcU9g5Q3v+X2N0JLCBi7qCkug5zxybfXXCoOINLgLuXBVFuoMsYtC1O6ogVPJ46gXdX4x8kKHXMx4bJGOsAgF+17bCEH+z50p/KpdExqzkEdIJqb2b8G/ftW/qdcH3kbvDNB88DV8ee1PlAfv1PtP2+i3aHaiHCne3QSkhm+yeKtz9+H8EFnhgLTO9jG4gYHrAJvAQ1q7ZqTOwiTedgzk4eBd1EeZhPwA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Paul Durrant <paul@xxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
- Delivery-date: Wed, 01 Dec 2021 09:41:24 +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
@@ -76,8 +76,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
@@ -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);
+
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();
-}
|