iommu: Add max_pasids field in struct dev_iommu
authorLu Baolu <baolu.lu@linux.intel.com>
Mon, 31 Oct 2022 00:59:06 +0000 (08:59 +0800)
committerJoerg Roedel <jroedel@suse.de>
Thu, 3 Nov 2022 14:47:44 +0000 (15:47 +0100)
commit22d2c7afb3697a68c7fc05c935ef662dee06dc60
tree7877f4524e9b3f2d32ab72e9761dcfdaa3b7cb63
parent1adf3cc20d693569ebee90fd91fa34b0570fcd6f
iommu: Add max_pasids field in struct dev_iommu

Use this field to save the number of PASIDs that a device is able to
consume. It is a generic attribute of a device and lifting it into the
per-device dev_iommu struct could help to avoid the boilerplate code
in various IOMMU drivers.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Tested-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Tested-by: Tony Zhu <tony.zhu@intel.com>
Link: https://lore.kernel.org/r/20221031005917.45690-3-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c
include/linux/iommu.h