Pinned, non-revocable mappings of VRAM: will bad things happen?

Demi Marie Obenour
2026-04-15T23:27:46Z

[-- Attachment #1.1.1: Type: text/plain, Size: 862 bytes --]

Is it safe to assume that if a dmabuf exporter cannot handle
non-revocable, pinned importers, it will fail the import? Or is
using dma_buf_pin() unsafe if one does not know the exporter?

For context, Xen grant tables do not support revocation. One can ask
the guest to unmap the grants, but if the guest doesn't obey the only
recourse is to ungracefully kill it. They also do not support page
faults, so the pages must be pinned. Right now, grant tables don't
support PCI BAR mappings, but that's fixable.

How badly is this going to break with dGPU VRAM, if at all? I know
that AMDGPU has a fallback when the BAR isn't mappable. What about
other drivers? Supporting page faults the way KVM does is going to
be extremely hard, so pinned mappings and DMA transfers are vastly
preferable.
--
Sincerely,
Demi Marie Obenour (she/her/hers)

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]