Re: [PATCH v3 4/5] iommu/hyperv: Add para-virtualized IOMMU support for Hyper-V guest

From: Jason Gunthorpe

Date: Mon Aug 17 2026 - 14:07:27 EST


On Tue, Aug 18, 2026 at 01:22:03AM +0800, Yu Zhang wrote:

> So we could
> - either keep the duplicate check in hv_iommu_blocking_attach_dev();
> - or add code in our common helper, hv_iommu_attach_dev(), to treat
> HV_STATUS_DEVICE_ALREADY_IN_DOMAIN also as successful explicitly.
>
> And since normal paging-domain attaches do not have this duplicate
> case, I'd prefer the first choice, to keep current check in
> hv_iommu_blocking_attach_dev().

I think everything can technically be re-attached and must not fail,
you have to handle that possibility everywhere.

So accepting that code as success seems like it might be needed anyhow?

Jason