[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240905160504.GQ1358970@nvidia.com>
Date: Thu, 5 Sep 2024 13:05:04 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: kevin.tian@...el.com, will@...nel.org, joro@...tes.org,
suravee.suthikulpanit@....com, robin.murphy@....com,
dwmw2@...radead.org, baolu.lu@...ux.intel.com, shuah@...nel.org,
linux-kernel@...r.kernel.org, iommu@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org,
linux-kselftest@...r.kernel.org, eric.auger@...hat.com,
jean-philippe@...aro.org, mdf@...nel.org, mshavit@...gle.com,
shameerali.kolothum.thodi@...wei.com, smostafa@...gle.com,
yi.l.liu@...el.com
Subject: Re: [PATCH v2 08/19] iommufd/viommu: Add cache_invalidate for
IOMMU_VIOMMU_TYPE_DEFAULT
On Tue, Aug 27, 2024 at 09:59:45AM -0700, Nicolin Chen wrote:
> Add a default_viommu_ops with a new op for cache invaldiation, similar to
> the cache_invalidate_user op in structure iommu_domain_ops, but wider. An
> IOMMU driver that allocated a nested domain with a core-managed viommu is
> able to use the same viommu pointer for this cache invalidation API.
>
> ARM SMMUv3 for example supports IOTLB and ATC device cache invaldiations.
> The IOTLB invalidation is per-VMID, held currently by a parent S2 domain.
> The ATC invalidation is per device (Stream ID) that should be tranlsated
> by a virtual device ID lookup table. Either case fits the viommu context.
>
> Signed-off-by: Nicolin Chen <nicolinc@...dia.com>
> ---
> drivers/iommu/iommufd/iommufd_private.h | 3 +++
> drivers/iommu/iommufd/viommu.c | 3 +++
> include/linux/iommu.h | 5 +++++
> include/linux/iommufd.h | 19 +++++++++++++++++++
> 4 files changed, 30 insertions(+)
It looks OK
Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
Jason
Powered by blists - more mailing lists