On Linux, direct memory is a memfd mapped MAP_SHARED. amdgpu accepts only private anonymous memory for a host pointer import (libdrm sets AMDGPU_GEM_USERPTR_ANONONLY), so every import of direct memory failed with VK_ERROR_INVALID_EXTERNAL_HANDLE and its ranges were copied. When a host pointer import fails, the range's memfd slice is turned into a dma-buf through /dev/udmabuf and imported with VK_EXT_external_memory_dma_buf. The direct memory backing is sealed against shrinking and growing, as udmabuf requires. libkernel reports the backing of a guest range through GuestArenaSharedBacking. Without /dev/udmabuf, or past its size limit, the range is copied as before. APS5_TRACE_HOST_IMPORT now prints the mappings behind a failed import on Linux too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| include | ||
| src | ||
| CMakeLists.txt | ||
| Export.cpp | ||