From: Jason Gunthorpe <jgg@nvidia.com>
To: Samiullah Khawaja <skhawaja@google.com>
Cc: iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
Robin Murphy <robin.murphy@arm.com>,
Will Deacon <will@kernel.org>,
Alejandro Jimenez <alejandro.j.jimenez@oracle.com>,
Joerg Roedel <joerg.roedel@amd.com>,
Kevin Tian <kevin.tian@intel.com>,
kernel test robot <lkp@intel.com>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
patches@lists.linux.dev
Subject: Re: [PATCH 3/3] iommupt: Avoid rewalking during map
Date: Mon, 19 Jan 2026 19:40:15 -0400 [thread overview]
Message-ID: <20260119234015.GW1134360@nvidia.com> (raw)
In-Reply-To: <CAAywjhR_Jh5K8VgLWFxvXwn66bV3vdmuxGN_OKh18Xoxb_NT6A@mail.gmail.com>
On Wed, Jan 14, 2026 at 08:12:50PM -0800, Samiullah Khawaja wrote:
> > @@ -627,6 +671,8 @@ static int __map_range(struct pt_range *range, void *arg, unsigned int level,
> > pt_index_to_va(&pts);
> > if (pts.index >= pts.end_index)
> > break;
> > + if (map->leaf_level == level)
> > + return -EAGAIN;
>
> Could you please add a comment here. Maybe something that says that a
> level switch happened and the caller needs to retry?
/*
* This level is currently running __map_range_leaf() which is
* not correct if the target level has been updated to this
* level. Have the caller invoke __map_range_leaf.
*/
if (map->leaf_level == level)
return -EAGAIN;
Thanks,
Jason
next prev parent reply other threads:[~2026-01-19 23:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 14:49 [PATCH 0/3] Let iommupt manage changes in page size internally Jason Gunthorpe
2026-01-12 14:49 ` [PATCH 1/3] iommupt: Make pt_feature() always_inline Jason Gunthorpe
2026-01-14 8:15 ` Tian, Kevin
2026-01-12 14:49 ` [PATCH 2/3] iommupt: Directly call iommupt's unmap_range() Jason Gunthorpe
2026-01-15 6:17 ` Tian, Kevin
2026-01-15 18:26 ` Samiullah Khawaja
2026-01-12 14:49 ` [PATCH 3/3] iommupt: Avoid rewalking during map Jason Gunthorpe
2026-01-15 4:12 ` Samiullah Khawaja
2026-01-19 23:40 ` Jason Gunthorpe [this message]
2026-01-15 6:44 ` Tian, Kevin
2026-01-19 23:30 ` Jason Gunthorpe
2026-01-18 9:47 ` [PATCH 0/3] Let iommupt manage changes in page size internally Joerg Roedel
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=20260119234015.GW1134360@nvidia.com \
--to=jgg@nvidia.com \
--cc=alejandro.j.jimenez@oracle.com \
--cc=iommu@lists.linux.dev \
--cc=joerg.roedel@amd.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=lkp@intel.com \
--cc=pasha.tatashin@soleen.com \
--cc=patches@lists.linux.dev \
--cc=robin.murphy@arm.com \
--cc=skhawaja@google.com \
--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