RE: [PATCH v5 04/13] iommufd/hw_pagetable: Enforce invalidation op on vIOMMU-based hwpt_nested

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Nicolin Chen <nicolinc@xxxxxxxxxx>
> 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 &&
> +			  !hwpt->domain->ops->cache_invalidate_user))) {
>  		rc = -EINVAL;
>  		goto out_abort;
>  	}

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?





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux