iommu: Enhance IOMMU default DMA mode build options
authorZhen Lei <thunder.leizhen@huawei.com>
Mon, 12 Jul 2021 11:12:17 +0000 (19:12 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 26 Jul 2021 11:27:38 +0000 (13:27 +0200)
commit712d8f205835c1d170e85d7811da3d9f36d8fab7
tree1a3c0c3868e40bae3b9dd2bb62a1197f2f1c6cf0
parentd8577d2e331dc06f5871afa6b76035dd8b74c903
iommu: Enhance IOMMU default DMA mode build options

First, add build options IOMMU_DEFAULT_{LAZY|STRICT}, so that we have the
opportunity to set {lazy|strict} mode as default at build time. Then put
the two config options in an choice, as they are mutually exclusive.

[jpg: Make choice between strict and lazy only (and not passthrough)]

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/1626088340-5838-4-git-send-email-john.garry@huawei.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Documentation/admin-guide/kernel-parameters.txt
drivers/iommu/Kconfig
drivers/iommu/iommu.c