[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47b5dfbe-dda7-419d-9032-d61bda44eb9f@linux.intel.com>
Date: Thu, 23 Oct 2025 12:50:13 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: Nicolin Chen <nicolinc@...dia.com>, joro@...tes.org, jgg@...dia.com,
kevin.tian@...el.com
Cc: suravee.suthikulpanit@....com, will@...nel.org, robin.murphy@....com,
sven@...nel.org, j@...nau.net, robin.clark@....qualcomm.com,
m.szyprowski@...sung.com, krzk@...nel.org, dwmw2@...radead.org,
yong.wu@...iatek.com, matthias.bgg@...il.com,
angelogioacchino.delregno@...labora.com, tjeznach@...osinc.com,
pjw@...nel.org, palmer@...belt.com, aou@...s.berkeley.edu, heiko@...ech.de,
schnelle@...ux.ibm.com, mjrosato@...ux.ibm.com, orsonzhai@...il.com,
baolin.wang@...ux.alibaba.com, wens@...e.org, jernej.skrabec@...il.com,
samuel@...lland.org, thierry.reding@...il.com, jonathanh@...dia.com,
jean-philippe@...aro.org, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, asahi@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
linux-samsung-soc@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-riscv@...ts.infradead.org, linux-rockchip@...ts.infradead.org,
linux-s390@...r.kernel.org, linux-sunxi@...ts.linux.dev,
linux-tegra@...r.kernel.org, virtualization@...ts.linux.dev,
patches@...ts.linux.dev
Subject: Re: [PATCH v2 5/6] iommu: Do not revert set_domain for the last gdev
On 10/23/25 10:21, Nicolin Chen wrote:
> The last gdev is the device that failed the __iommu_device_set_domain().
> So, it doesn't need to be reverted, given it's attached to group->domain
> already.
>
> This is not a problem currently, since it's a simply re-attach. However,
> the core will need to pass in the old domain to __iommu_device_set_domain
> so the old domain pointers would be inconsistent between a failed device
> and all its prior succeeded devices, as all the prior devices need to be
> reverted.
>
> Avoid the re-attach for the last gdev, by breaking before the revert.
>
> Reviewed-by: Jason Gunthorpe<jgg@...dia.com>
> Signed-off-by: Nicolin Chen<nicolinc@...dia.com>
> ---
> drivers/iommu/iommu.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Reviewed-by: Lu Baolu <baolu.lu@...ux.intel.com>
Powered by blists - more mailing lists