RE: [PATCH v4 1/7] iommu/arm-smmu-v3: Add release_domain to attach prior to release_dev()

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

 



> From: Nicolin Chen <nicolinc@xxxxxxxxxx>
> Sent: Monday, September 1, 2025 7:32 AM
> 
> +static int arm_smmu_attach_dev_release(struct iommu_domain *domain,
> +				       struct device *dev)
> +{
> +	struct arm_smmu_master *master = dev_iommu_priv_get(dev);
> +
> +	WARN_ON(master->iopf_refcount);
> +
> +	/* Put the STE back to what arm_smmu_init_strtab() sets */
> +	if (dev->iommu->require_direct)
> +
> 	arm_smmu_attach_dev_identity(&arm_smmu_identity_domain,
> dev);
> +	else
> +
> 	arm_smmu_attach_dev_blocked(&arm_smmu_blocked_domain,
> dev);

it's a bit confusing that a BLOCKED domain type could turn to the
identity mode, though this movement doesn't change the original
behavior.

> +
> +	return 0;
> +}
> +
> +static const struct iommu_domain_ops arm_smmu_release_ops = {
> +	.attach_dev = arm_smmu_attach_dev_release,
> +};
> +
> +static struct iommu_domain arm_smmu_release_domain = {
> +	.type = IOMMU_DOMAIN_BLOCKED,
> +	.ops = &arm_smmu_release_ops,
> +};
> +





[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux