]> xenbits.xensource.com Git - xen.git/commitdiff
x86/iommu: snoop control is allowed only by Intel VT-d
authorXenia Ragiadakou <burzalodowa@gmail.com>
Mon, 13 Feb 2023 15:26:43 +0000 (16:26 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 13 Feb 2023 15:26:43 +0000 (16:26 +0100)
The AMD-Vi driver forces coherent accesses by hardwiring the FC bit to 1.
Therefore, given that iommu_snoop is used only when the iommu is enabled,
when Xen is configured with only the AMD iommu enabled, iommu_snoop can be
reduced to a #define to true.

No functional change intended.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/include/xen/iommu.h

index 4f22fc1bed5523c5b1a8951579975e0712c08c28..626731941bbcc9df0b194063262e6a3cf6a529cb 100644 (file)
@@ -74,7 +74,12 @@ extern enum __packed iommu_intremap {
    iommu_intremap_restricted,
    iommu_intremap_full,
 } iommu_intremap;
-extern bool iommu_igfx, iommu_qinval, iommu_snoop;
+extern bool iommu_igfx, iommu_qinval;
+#ifdef CONFIG_INTEL_IOMMU
+extern bool iommu_snoop;
+#else
+# define iommu_snoop true
+#endif /* CONFIG_INTEL_IOMMU */
 #else
 # define iommu_intremap false
 # define iommu_snoop false