Hi Daniel,

De: Daniel Stone <[email protected]>
Para: "Igor Torrente"<[email protected]>
Cc: <[email protected]>, <[email protected]>, 
<[email protected]>, <[email protected]>, 
<[email protected]>, <[email protected]>, <[email protected]>, 
<[email protected]>, <[email protected]>
Fecha: lun, 09 nov. 2026 14:38:57 -0300
Asunto: Re: [PATCH] drm/panthor: Allow exporting BOs with an exclusive VM

 > Hi Igor,
 > 
 > On Mon, 9 Nov 2026 at 10:57, Igor Torrente <[email protected]> 
 > wrote:
 > > Panthor currently does not allow exporting BOs with an exclusive VM.
 > > However, VDRM (native context) drivers export BOs for import by the guest
 > > VM, which does not attempt to bind them to any GPU VM.
 > >
 > > Allow these BOs to be exported and rely on
 > > panthor_vm_prepare_map_op_ctx() to reject attempts to bind them to a
 > > different GPU VM.
 > 
 > I'm having a little trouble parsing this.
 > 
 > Is the problem that:
 > - the guest requests allocation of a BO with exclusive_vm_root_gem = guest_vm
 > - the host passes that allocation through
 > - the host exports a dmabuf from the allocation (which fails)
 > - the host imports a dmabuf from the allocation (?)
 > - the guest requests the BO be attached to guest_vm
 > 
 > i.e. is the problem that some host implementations (virglrenderer)
 > handle BO allocation exclusively via an export/import interface?

I was testing and checking a few things. This patch needs at least a 
rewording, but maybe we can drop it entirely.

The virtio_gpu part of Virglrenderer used to create a transitory export
to mmap the BO and attach it to the guest VM (not import, as I previously 
wrote).
With resource_map, this transitory mapping is now obsolete.

Vpipe still shares buffers with the client through FDs (even non-shareable BOs).
It seems that this is an expectation of the protocol. I will check to see if we
can avoid this for non-shareable (exclusive-VM) cases.

Lastly, if I’m not mistaken, CrosVM’s sandbox separates the GPU device into 
another
process, making the export necessary (possibly even for non-shareable BOs). 
This may
or may not be an issue.

BR,
Igor

 > 
 > If that is the problem, it seems like it would be cleaner to have the
 > host implementation strip the exclusive VM ID from the request, until
 > they can be fixed to not require the export/import dance.
 > 
 > Cheers,
 > Daniel
 > 


Reply via email to