Unverified Commit 14189353 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12599 iommufd: Require drivers to supply the cache_invalidate_user ops

parents d74c077f 672b03b0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -236,7 +236,8 @@ iommufd_hwpt_nested_alloc(struct iommufd_ctx *ictx,
	}
	hwpt->domain->owner = ops;

	if (WARN_ON_ONCE(hwpt->domain->type != IOMMU_DOMAIN_NESTED)) {
	if (WARN_ON_ONCE(hwpt->domain->type != IOMMU_DOMAIN_NESTED ||
			 !hwpt->domain->ops->cache_invalidate_user)) {
		rc = -EINVAL;
		goto out_abort;
	}