[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d6236413-7385-45c5-94ad-8b0f2007f1ac@linux.intel.com>
Date: Fri, 9 Jan 2026 11:28:32 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: Mostafa Saleh <smostafa@...gle.com>,
Pranjal Shrivastava <praan@...gle.com>
Cc: linux-mm@...ck.org, iommu@...ts.linux.dev, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, corbet@....net, joro@...tes.org, will@...nel.org,
robin.murphy@....com, akpm@...ux-foundation.org, vbabka@...e.cz,
surenb@...gle.com, mhocko@...e.com, jackmanb@...gle.com, hannes@...xchg.org,
ziy@...dia.com, david@...hat.com, lorenzo.stoakes@...cle.com,
Liam.Howlett@...cle.com, rppt@...nel.org, xiaqinxin@...wei.com,
rdunlap@...radead.org
Subject: Re: [PATCH v5 3/4] iommu: debug-pagealloc: Track IOMMU pages
On 1/8/26 19:33, Mostafa Saleh wrote:
> I have this, it should have the same effect + a WARN, I will include
> it in the new version
>
> diff --git a/drivers/iommu/iommu-debug-pagealloc.c
> b/drivers/iommu/iommu-debug-pagealloc.c
> index 5353417e64f9..64ec0795fe4c 100644
> --- a/drivers/iommu/iommu-debug-pagealloc.c
> +++ b/drivers/iommu/iommu-debug-pagealloc.c
> @@ -146,16 +146,12 @@ void __iommu_debug_unmap_end(struct iommu_domain *domain,
> if (unmapped == size)
> return;
>
> - /*
> - * If unmap failed, re-increment the refcount, but if it unmapped
> - * larger size, decrement the extra part.
> - */
> + /* If unmap failed, re-increment the refcount. */
> if (unmapped < size)
> __iommu_debug_update_iova(domain, iova + unmapped,
> size - unmapped, true);
> else
> - __iommu_debug_update_iova(domain, iova + size,
> - unmapped - size, false);
> + WARN_ONCE(1, "iommu: unmap larger than requested is
> not supported in debug_pagealloc\n");
> }
>
> void iommu_debug_init(void)
How aobut
if ((unmapped == size) || WARN_ON_ONCE(unmapped > size))
return;
/* If unmap failed, re-increment the refcount. */
__iommu_debug_update_iova(domain, iova + unmapped, size - unmapped, true);
?
Thanks,
baolu
Powered by blists - more mailing lists