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

[PATCH 3/4] VT-d: skip IOMMU bitmap cleanup for phantom devices


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 15 Sep 2021 11:13:16 +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; bh=32ebYhQya8W1RrUzbbQIk60a77c15WTRh4/23DDxt8s=; b=TJORSQ5y9HVkQeOC/H0aqi91f4KSXzWYzac5VRxRMDr/8J53fJwg+nJp8qwinmlt5m0W241SyYpo5F4qFn1HMpY6bxzq8ULOtNRiHJJSQqbYY9Ba662zYaa+dK0ZbEy+38s/H+Z/LWdkfdICjMjldSPH21t8ebrtiEcIS2zPHRP1SN6di7gcUeOK1r40AQOKuNgs7n3qezb9210s7OO94cN34qCxdF4t7TV3VUkotCO8pTCY3saO7eXqZRmShKNtm4/Hcnyq0vxguUIb4OXZSTJ5348ndN2EoixrFzOTGDx6YC9bxBdcul3+CyFDk3Tz8CeRIOXlEfP6Hw2eS5lF4g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GwRwISbZXLP3toO46IJntMnZTALYvIh2Nj/kLOpH1vKwiqSmrh3NQJonKMwv4QTmJEucidi7aaKQqFlKC7n2adKKQVWLpsW0Y8a4/AhQEtXmBEcMk656rcRKvnvj48F/LBqWI6XLJpk/GVQS5Eyqj2rgizBhyE1o/v9ezqqqKzdIgpu6H4HjCodNdChcWrkyo9oAKylKRo5x6CHEyItfcFKOF7RLR0ZrjjYxzlAsYIxEHkSndiqlsb84FzbASCp9ABL2NeQOTTdHWnQUk7+F1Y6qFdS/noupRXjaHGR8PLZejkZIto1lASP4sfJKGP2cIchQuiWuPZBBSTJ737YVag==
  • Authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=suse.com;
  • Cc: Paul Durrant <paul@xxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Wed, 15 Sep 2021 09:13:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Doing the cleanup also for phantom devices is at best redundant with
doing it for the corresponding real device. I couldn't force myself into
checking all the code paths whether it really is: It seems better to
explicitly skip this step in such cases.

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

--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1733,7 +1733,7 @@ static int domain_context_unmap(struct d
         return -EINVAL;
     }
 
-    if ( ret || QUARANTINE_SKIP(domain) )
+    if ( ret || QUARANTINE_SKIP(domain) || pdev->devfn != devfn )
         return ret;
 
     /*




 


Rackspace

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