Re: [RFC PATCH v6 01/11] vfio: cache KVM VM file references instead of raw struct kvm pointers

From: Aneesh Kumar K . V

Date: Wed Sep 30 2026 - 03:27:48 EST


Jason Gunthorpe <jgg@xxxxxxxxxx> writes:

>> VFIO currently records struct kvm pointers on vfio_group, vfio_device_file
>> and the opened vfio_device. Switch VFIO to track the VM's struct file
>> instead, so VFIO and iommufd can use normal file references for VM lifetime
>> instead of depending on KVM's internal struct kvm refcounting.
>
> Are these few patches the same as:
> https://lore.kernel.org/all/20260924-vfio-v3-0-4a294307797b@xxxxxxxxxxxxx/
>
> Can we align on that series or is there something else here?
>

Yes. I will use v4 of that series as the basis for this patch series.

-aneesh