Commit ce6c7742 authored by Yi Liu's avatar Yi Liu Committed by Jason Zeng
Browse files

iommufd: Use the domain_alloc_user() op for domain allocation

mainline inclusion
from mainline-v6.7-rc1
commit 7975b722087fa23ff3ad1ff4998b8572a7e17e84
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I8Y6AM
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?7975b722087fa23ff3ad1ff4998b8572a7e17e84

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

Make IOMMUFD use iommu_domain_alloc_user() by default for iommu_domain
creation. IOMMUFD needs to support iommu_domain allocation with parameters
from userspace in nested support, and a driver is expected to implement
everything under this op.

If the iommu driver doesn't provide domain_alloc_user callback then
IOMMUFD falls back to use iommu_domain_alloc() with an UNMANAGED type if
possible.

Intel-SIG: 7975b722087f iommufd: Use the domain_alloc_user() op for domain allocation
Backport IOMMUFD Dirty Tracking

Link: https://lore.kernel.org/r/20230928071528.26258-3-yi.l.liu@intel.com


Suggested-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Reviewed-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: default avatarKevin Tian <kevin.tian@intel.com>
Co-developed-by: default avatarNicolin Chen <nicolinc@nvidia.com>
Signed-off-by: default avatarNicolin Chen <nicolinc@nvidia.com>
Signed-off-by: default avatarYi Liu <yi.l.liu@intel.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
[ jz: amend commit log ]
Signed-off-by: default avatarJason Zeng <jason.zeng@intel.com>
parent b900c11e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment