We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccb76c5 commit 0f6a904Copy full SHA for 0f6a904
drivers/iommu/iommu.c
@@ -1920,6 +1920,18 @@ static int iommu_get_default_domain_type(struct iommu_group *group,
1920
}
1921
1922
1923
+ /*
1924
+ * If the common dma ops are not selected in kconfig then we cannot use
1925
+ * IOMMU_DOMAIN_DMA at all. Force IDENTITY if nothing else has been
1926
+ * selected.
1927
+ */
1928
+ if (!IS_ENABLED(CONFIG_IOMMU_DMA)) {
1929
+ if (WARN_ON(driver_type == IOMMU_DOMAIN_DMA))
1930
+ return -1;
1931
+ if (!driver_type)
1932
+ driver_type = IOMMU_DOMAIN_IDENTITY;
1933
+ }
1934
+
1935
if (untrusted) {
1936
if (driver_type && driver_type != IOMMU_DOMAIN_DMA) {
1937
dev_err_ratelimited(
0 commit comments