On Thu, May 29, 2025 at 09:49:51PM +0800, Xu Yilun wrote: > > > @@ -68,10 +121,32 @@ int iommufd_viommu_alloc_ioctl(struct iommufd_ucmd *ucmd) > > > */ > > > viommu->iommu_dev = __iommu_get_iommu_dev(idev->dev); > > > > > > + /* get the kvm details if specified. */ > > > + if (cmd->kvm_vm_fd) { > > > > Pedantically a 0 fd is still valid, you should add a flag to indicate > > if the KVM is being supplied. > > Did I miss something? Shameer's patch passed in struct kvm* through > iommufd_device_bind() then to viommu, and has your Reviewed-by. I'm a > little confused... > > https://lore.kernel.org/all/20250319232848.GD126678@xxxxxxxx/ He was doing something different, and IIRC posted it before viommu was merged Jason