On Tue, Sep 22, 2026 at 03:46:37PM +0300, Leon Romanovsky wrote:
On Tue, Sep 22, 2026 at 09:41:37AM -0300, Jason Gunthorpe wrote:
On Mon, Sep 21, 2026 at 04:09:18PM +0200, Christian König wrote:
I would avoid that and just re-create the DMA-buf fd from scratch. The extra overhead is negligible and one way state transmissions are usually much easier to handle.
Yeah, maybe we should have done that. Might be too late now.
It's already uAPI?
Yeah, but Matt is making some changes here so maybe new stuff can avoid this. I'm not sure.
Jason, the proposed semantics is not UAPI yet.
What I'm talking about is, the revoke/unrevoke flow for a single FD was added from the start. For example vfio_pci_ioctl_reset() does it:
+ vfio_pci_dma_buf_move(vdev, true); ret = pci_try_reset_function(vdev->pdev); + if (__vfio_pci_memory_enabled(vdev)) + vfio_pci_dma_buf_move(vdev, false); up_write(&vdev->memory_lock);
The false restores the exsting dmabuf fds back to normal operation.
Matt's version is one that defeates the above false so once revoked it stays revoked forever.
Jason