From: Jason Gunthorpe jgg@nvidia.com Sent: Wednesday, October 30, 2024 12:05 AM
On Tue, Oct 29, 2024 at 08:22:43AM +0000, Tian, Kevin wrote:
From: Nicolin Chen nicolinc@nvidia.com Sent: Saturday, October 26, 2024 7:51 AM
@@ -302,7 +302,9 @@ iommufd_viommu_alloc_hwpt_nested(struct iommufd_viommu *viommu, u32 flags, } hwpt->domain->owner = viommu->iommu_dev->ops;
- if (WARN_ON_ONCE(hwpt->domain->type !=
IOMMU_DOMAIN_NESTED)) {
- if (WARN_ON_ONCE(hwpt->domain->type !=
IOMMU_DOMAIN_NESTED ||
(!viommu->ops->cache_invalidate &&
rc = -EINVAL; goto out_abort; }!hwpt->domain->ops->cache_invalidate_user))) {
According to patch5, cache invalidate in viommu only uses viommu->ops->cache_invalidate. Is here intended to allow nested hwpt created via viommu to still support the old method?
I think that is reasonable?
Yes, just want to confirm.
Reviewed-by: Kevin Tian kevin.tian@intel.com