Re: [PATCH v7 08/16] iommufd/viommu: Keep a reference to the KVM file

From: Jason Gunthorpe

Date: Fri Oct 30 2026 - 13:03:41 EST


On Fri, Oct 30, 2026 at 07:54:04AM +0000, Tian, Kevin wrote:

> Besides, it might be a good idea to return an error if idev->kvm_file is
> NULL in iommufd_viommu_alloc_ioctl(). I don't think the viommu logic
> is designed for native application...

That's probably going too far..

It should be possible to fully test most of the viommu stuff without
an actual kvm, for example.

Jason