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

Yu Zhang <[email protected]>
Newsgroups org.kernel.vger.linux-arch,dev.linux.lists.iommu,org.kernel.vger.linux-hyperv,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci
Message-ID <4cchi7bka5sopnvxyeycmv23scesfgtkg5lnlrq2yqsmwah5qd@5e3qqvsil2t3>
On Mon, Aug 17, 2026 at 02:35:52PM -0300, Jason Gunthorpe wrote:
> 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?
> 

Thank you, Jason! Then we'll introduce HV_STATUS_DEVICE_ALREADY_IN_DOMAIN,
and treat it as successful in hv_iommu_attach_dev().

B.R.
Yu
> Jason
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.