Commit 4f9fce3a authored by Hanjun Guo's avatar Hanjun Guo Committed by Zheng Zengkai
Browse files

IOMMU: SMMUv2: Bypass SMMU in default for some SoCs

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I41AUQ


CVE: NA

-------------------------------------

Support SMMU default bypass for some CPU SoCs which the SMMU is not
functional well in address translation mode.

We already have the .def_domain_type hook for iommu_ops in iommu driver,
so we add the CPU SoC SMMU bypass code in the .def_domain_type hook in
smmuv2 driver, and return IOMMU_DOMAIN_IDENTITY for such SoCs.

After we add the hook, we set all the devices for such SoCs in pass
through mode, no matter adding iommu.passthrough=off/on or not in the
boot cmdline.

While we at it, update the config SMMU_BYPASS_DEV to specify the
useage.

Signed-off-by: default avatarHanjun Guo <guohanjun@huawei.com>
Cc: Guo Hui <guohui@uniontech.com>
Cc: Cheng Jian <cj.chengjian@huawei.com>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Xiuqi Xie <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent d9001fe7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment