Re: [PATCH 2/6] iommu/vt-d: Implement hw_info for iommu capability query

From: Jason Gunthorpe
Date: Mon Feb 13 2023 - 09:51:52 EST


On Wed, Feb 08, 2023 at 08:16:38PM -0800, Yi Liu wrote:
> From: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
>
> To support nested translation in the userspace, it should check the
> underlying hardware information for the capabilities.
>
> Add intel_iommu_hw_info() to report cap_reg and ecap_reg information.
>
> Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> Signed-off-by: Yi Liu <yi.l.liu@xxxxxxxxx>
> Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx>
> Signed-off-by: Yi Sun <yi.y.sun@xxxxxxxxxxxxxxx>
> ---
> drivers/iommu/intel/iommu.c | 19 +++++++++++++++++++
> drivers/iommu/intel/iommu.h | 1 +
> include/uapi/linux/iommufd.h | 21 +++++++++++++++++++++
> 3 files changed, 41 insertions(+)

This should come after the next patch in the series

Jason