Re: [PATCH v2 12/26] iommu/amd: Add per-VM private IPA alloc/map helpers
From: Jason Gunthorpe
Date: Mon Jun 01 2026 - 09:11:25 EST
On Thu, May 28, 2026 at 05:17:24AM +0000, Suravee Suthikulpanit wrote:
> Export amd_iommu_iotlb_sync() and use it for nested domain
> iotlb_sync so nested attach paths can flush gathered IOTLB state.
[ ..]
> --- a/drivers/iommu/amd/nested.c
> +++ b/drivers/iommu/amd/nested.c
> @@ -291,4 +291,5 @@ static void nested_domain_free(struct iommu_domain *dom)
> static const struct iommu_domain_ops nested_domain_ops = {
> .attach_dev = nested_attach_device,
> .free = nested_domain_free,
> + .iotlb_sync = amd_iommu_iotlb_sync,
> };
I don't get it, what is all of this for?
iotlb_sync should never be called on an IOMMU_DOMAIN_NESTED.
"nested attach paths" should never have gathered IOTLB state.
Jason