On Mon, Jul 15, 2024 at 10:29:26AM -0400, Steven Sistare wrote: > On 7/15/2024 5:07 AM, Michael S. Tsirkin wrote: > > On Fri, Jul 12, 2024 at 06:18:49AM -0700, Steve Sistare wrote: > > > Add an ioctl to transfer file descriptor ownership and pinned memory > > > accounting from one process to another. > > > > > > This is more efficient than VHOST_RESET_OWNER followed by VHOST_SET_OWNER, > > > as that would unpin all physical pages, requiring them to be repinned in > > > the new process. That would cost multiple seconds for large memories, and > > > be incurred during a virtual machine's pause time during live update. > > > > > > Signed-off-by: Steve Sistare <steven.sistare@xxxxxxxxxx> > > > > Please, we just need to switch to use iommufd for pinning. > > Piling up all these hacks gets us nowhere. > > I am working on iommufd kernel interfaces and QEMU changes. But who is working > on iommufd support for vdpa? If no one, or not for years, then adding these > small interfaces to vdpa plugs a signficant gap in live update coverage. > > FWIW, the iommufd interfaces for live update will look much the same: change owner > and pinned memory accounting, and update virtual addresses. So adding that to vdpa > will not make it look like an odd duck. > > - Steve I think that no one is working on it - Cindy posted some rfcs in January ("vhost-vdpa: add support for iommufd"). Feel free to pick that up. What you described is just more of a reason not to duplicate this code. And it's always the same: a small extension here, a small extension there. If you can make do with existing kernel interfaces, fine, one can argue that userspace code is useful to support existing kernels. -- MST