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
> 

Reply via email to