提交 05ab2496 编写于 作者: J Jiankang Chen 提交者: Xie XiuQi

iommu: Allow the thread binding device

hulk inclusion
category: feature
bugzilla: 14369
CVE: NA
-------------------

iommu pasid bond to device
Signed-off-by: NJiankang Chen <chenjiankang1@huawei.com>
Signed-off-by: NFang Lijun <fanglijun3@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Reviewed-by: NZhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 ca10cd64
......@@ -679,9 +679,10 @@ int __iommu_sva_bind_device(struct device *dev, struct mm_struct *mm,
}
spin_unlock(&iommu_sva_lock);
if (bond)
return -EEXIST;
if (bond) {
*pasid = bond->io_mm->pasid;
return ret;
}
/* Require identical features within an io_mm for now */
if (io_mm && (flags != io_mm->flags)) {
io_mm_put(io_mm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册