On 1/30/26 15:44, Jason Gunthorpe wrote: > On Fri, Jan 30, 2026 at 03:11:48PM +0100, Christian König wrote: >> On 1/30/26 14:56, Jason Gunthorpe wrote: >>> On Fri, Jan 30, 2026 at 02:21:08PM +0100, Christian König wrote: >>> >>>> That would work for me. >>>> >>>> Question is if you really want to do it this way? See usually >>>> exporters try to avoid blocking such functions. >>> >>> Yes, it has to be this way, revoke is a synchronous user space >>> triggered operation around things like FLR or device close. We can't >>> defer it into some background operation like pm. >> >> Yeah, but you only need that in a couple of use cases and not all. > > Not all, that is why the dma_buf_attach_revocable() is there to > distinguish this case from others.
No, no that's not what I mean. See on the one hand you have runtime PM which automatically shuts down your device after some time when the last user stops using it. Then on the other hand you have an intentional revoke triggered by userspace. As far as I've read up on the code currently both are handled the same way, and that doesn't sound correct to me. Runtime PM should *not* trigger automatically when there are still mappings or even DMA-bufs in existence for the VFIO device. Regards, Christian. > > Jason
