Re: [RFC PATCH] iommufd: Destroy vdevice on device unbind

From: Xu Yilun
Date: Mon Jun 16 2025 - 02:06:19 EST


> While vdevice objects can still be explicitly destroyed using
> iommufd_destroy(), with this patch, if the idevice is still bound,
> attempting to destroy the vdevice will return EBUSY.

I didn't get the necessity of this restriction. A vdev could not
outlive idev, but it could be ended earlier than idev, isn't it?

>
> In effect, the change ensures that once a vdevice is created, its
> lifecycle is tied to that of the idevice.