From: Jon Hunter <jonathanh@nvidia.com>
To: Jason Gunthorpe <jgg@nvidia.com>, Robin Murphy <robin.murphy@arm.com>
Cc: Alexandre Ghiti <alex@ghiti.fr>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Albert Ou <aou@eecs.berkeley.edu>,
asahi@lists.linux.dev,
Baolin Wang <baolin.wang@linux.alibaba.com>,
iommu@lists.linux.dev, Janne Grunau <j@jannau.net>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Joerg Roedel <joro@8bytes.org>,
Jean-Philippe Brucker <jpb@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
linux-riscv@lists.infradead.org, linux-sunxi@lists.linux.dev,
Matthias Brugger <matthias.bgg@gmail.com>,
Neal Gompa <neal@gompa.dev>, Orson Zhai <orsonzhai@gmail.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <pjw@kernel.org>,
Samuel Holland <samuel@sholland.org>,
Sven Peter <sven@kernel.org>,
virtualization@lists.linux.dev, Chen-Yu Tsai <wens@kernel.org>,
Will Deacon <will@kernel.org>, Yong Wu <yong.wu@mediatek.com>,
Chunyan Zhang <zhang.lyra@gmail.com>,
Lu Baolu <baolu.lu@linux.intel.com>,
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>,
Joerg Roedel <joerg.roedel@amd.com>,
patches@lists.linux.dev, Samiullah Khawaja <skhawaja@google.com>,
stable@vger.kernel.org, Vasant Hegde <vasant.hegde@amd.com>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH] iommu: Always fill in gather when unmapping
Date: Wed, 8 Apr 2026 14:34:59 +0100 [thread overview]
Message-ID: <56559431-b73b-4e3b-8554-7a72d78e2b67@nvidia.com> (raw)
In-Reply-To: <94576121-d4ff-47fd-9ff8-2a00ff4c5c2a@nvidia.com>
On 08/04/2026 09:42, Jon Hunter wrote:
> Hi Robin, Jason,
>
> On 02/04/2026 23:51, Jason Gunthorpe wrote:
>> On Thu, Apr 02, 2026 at 07:11:13PM +0100, Robin Murphy wrote:
>>>>> @@ -2714,6 +2714,10 @@ static size_t __iommu_unmap(struct
>>>>> iommu_domain *domain,
>>>>> pr_debug("unmapped: iova 0x%lx size 0x%zx\n",
>>>>> iova, unmapped_page);
>>>>> + /* If the driver itself isn't using the gather, mark it
>>>>> used */
>>>>> + if (iotlb_gather->end <= iotlb_gather->start)
>>>>> + iommu_iotlb_gather_add_range(&iotlb_gather, iova,
>>>>> unmapped_page);
>>>>
>>>> The gathers can be joined across unmaps and now we are inviting subtly
>>>> ill-formed gathers as only the first unmap will get included.
>>
>>>> We do have error cases where the gather is legitimately empty, and
>>>> this would squash that, it probably needs to check unmapped_page for 0
>>>> too, at least.
>>>
>>> Maybe try looking at the rest of the code around these lines...
>>
>> Okay, well lets do this one, do you want to send it since it is your
>> idea?
>
>
> Any update on this? Boot is still broken on a couple of our boards.
I just noticed that this is now broken on mainline as well as -next. Can
we get a fix in place before v7.0 is released?
Thanks
Jon
--
nvpublic
prev parent reply other threads:[~2026-04-08 13:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 19:56 [PATCH] iommu: Always fill in gather when unmapping Jason Gunthorpe
2026-04-01 10:40 ` Jon Hunter
2026-04-01 11:23 ` Pranjal Shrivastava
2026-04-01 12:58 ` Jason Gunthorpe
2026-04-01 16:33 ` Robin Murphy
2026-04-01 17:36 ` Jason Gunthorpe
2026-04-02 18:11 ` Robin Murphy
2026-04-02 22:51 ` Jason Gunthorpe
2026-04-08 8:42 ` Jon Hunter
2026-04-08 13:34 ` Jon Hunter [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=56559431-b73b-4e3b-8554-7a72d78e2b67@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=alex@ghiti.fr \
--cc=angelogioacchino.delregno@collabora.com \
--cc=aou@eecs.berkeley.edu \
--cc=asahi@lists.linux.dev \
--cc=baolin.wang@linux.alibaba.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=j@jannau.net \
--cc=janusz.krzysztofik@linux.intel.com \
--cc=jernej.skrabec@gmail.com \
--cc=jgg@nvidia.com \
--cc=joerg.roedel@amd.com \
--cc=joro@8bytes.org \
--cc=jpb@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=neal@gompa.dev \
--cc=orsonzhai@gmail.com \
--cc=palmer@dabbelt.com \
--cc=patches@lists.linux.dev \
--cc=pjw@kernel.org \
--cc=robin.murphy@arm.com \
--cc=samuel@sholland.org \
--cc=skhawaja@google.com \
--cc=stable@vger.kernel.org \
--cc=sven@kernel.org \
--cc=vasant.hegde@amd.com \
--cc=virtualization@lists.linux.dev \
--cc=wens@kernel.org \
--cc=will@kernel.org \
--cc=yong.wu@mediatek.com \
--cc=zhang.lyra@gmail.com \
/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