From: Baolu Lu <baolu.lu@linux.intel.com>
To: Aashish Sharma <aashish@aashishsharma.net>,
Vineeth Pillai <vineeth@bitbyteword.org>,
Dmytro Maluka <dmaluka@google.com>,
David Woodhouse <dwmw2@infradead.org>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>
Cc: Robin Murphy <robin.murphy@arm.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
Aashish Sharma <shraash@google.com>
Subject: Re: [PATCH] iommu/vt-d: Remove unused code in dma_pte_free_pagetable
Date: Tue, 18 Nov 2025 09:56:10 +0800 [thread overview]
Message-ID: <f20ffea7-357e-4f1f-b451-d09cd7401ff5@linux.intel.com> (raw)
In-Reply-To: <20251014162408.2217563-1-aashish@aashishsharma.net>
On 10/15/25 00:24, Aashish Sharma wrote:
> 'dma_pte_free_pagetable' is only called by
> 'switch_to_super_page' and is not intended to free the
> whole page table (0..DOMAIN_MAX_PFN(domain->gaw)).
>
> Hence remove the code that checks for this and frees the page
> table pointed by 'domain->pgd'.
>
> Signed-off-by: Aashish Sharma (Google)<aashish@aashishsharma.net>
> ---
> drivers/iommu/intel/iommu.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> index e236c7ec221f..3b3ad7b0c0ce 100644
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -883,12 +883,6 @@ static void dma_pte_free_pagetable(struct dmar_domain *domain,
> /* We don't need lock here; nobody else touches the iova range */
> dma_pte_free_level(domain, agaw_to_level(domain->agaw), retain_level,
> domain->pgd, 0, start_pfn, last_pfn);
> -
> - /* free pgd */
> - if (start_pfn == 0 && last_pfn == DOMAIN_MAX_PFN(domain->gaw)) {
> - iommu_free_pages(domain->pgd);
> - domain->pgd = NULL;
> - }
> }
Thank you for the patch. The dma_pte_free_pagetable() helper has been
removed in the iommu/next branch.
>
> /* When a page at a given level is being unlinked from its parent, we don't
Thanks,
baolu
prev parent reply other threads:[~2025-11-18 2:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 16:24 Aashish Sharma
2025-11-18 1:56 ` Baolu Lu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f20ffea7-357e-4f1f-b451-d09cd7401ff5@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=aashish@aashishsharma.net \
--cc=dmaluka@google.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=shraash@google.com \
--cc=vineeth@bitbyteword.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®