]> xenbits.xensource.com Git - xen.git/commitdiff
iommu/vtd: cleanup MAP_SINGLE_DEVICE and related code
authorTeddy Astie <teddy.astie@vates.tech>
Thu, 18 Apr 2024 11:57:21 +0000 (11:57 +0000)
committerRoger Pau Monne <roger.pau@citrix.com>
Mon, 27 Jan 2025 12:05:11 +0000 (13:05 +0100)
This flag was only used in case cx16 is not available, as those code paths no
longer exist, this flag now does basically nothing.

Signed-off-by: Teddy Astie <teddy.astie@vates.tech>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/vtd.h

index b0963bfcf74e01927539dc04f95a78771e7befe9..9d7a9977a6a6f3e7c0b54b97f679cd1df437f340 100644 (file)
@@ -1695,15 +1695,9 @@ static int domain_context_mapping(struct domain *domain, u8 devfn,
         break;
     }
 
-    if ( domain != pdev->domain && pdev->domain != dom_io )
-    {
-        if ( pdev->domain->is_dying )
-            mode |= MAP_OWNER_DYING;
-        else if ( drhd &&
-                  !any_pdev_behind_iommu(pdev->domain, pdev, drhd->iommu) &&
-                  !pdev->phantom_stride )
-            mode |= MAP_SINGLE_DEVICE;
-    }
+    if ( domain != pdev->domain && pdev->domain != dom_io &&
+         pdev->domain->is_dying )
+        mode |= MAP_OWNER_DYING;
 
     switch ( pdev->type )
     {
index 8aeff8c1f287522058b67e7ecf2cf589a74f66b1..b95124517bd3fcca9043e7ef1bbaf540105331b8 100644 (file)
@@ -28,9 +28,8 @@
  */
 #define MAP_WITH_RMRR         (1u << 0)
 #define MAP_OWNER_DYING       (1u << 1)
-#define MAP_SINGLE_DEVICE     (1u << 2)
-#define MAP_ERROR_RECOVERY    (1u << 3)
-#define UNMAP_ME_PHANTOM_FUNC (1u << 4)
+#define MAP_ERROR_RECOVERY    (1u << 2)
+#define UNMAP_ME_PHANTOM_FUNC (1u << 3)
 
 /* Allow for both IOAPIC and IOSAPIC. */
 #define IO_xAPIC_route_entry IO_APIC_route_entry