AnyPS5/core/libs/prx/libc/include
alfalfa-star 815d274736 feat(agc): import shared direct memory through udmabuf on Linux
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>
2026-10-07 23:09:16 +02:00
..
exceptions refactor(libs): use local cmakelists in libc 2026-09-11 12:22:19 +03:00
general refactor(agc): make frame timing logs optional by cmake option 2026-09-28 10:51:29 +03:00
specifics feat(libc): operator new/delete, bounds-checked functions, char locale facets and runtime helpers 2026-09-28 14:22:48 +13:00
ApplicationHeap.hpp feat(libc): implement RaiseEv, catchReturnFromMain and reallocalign 2026-09-30 23:55:00 +00:00
CpuTopology.hpp feat(runtime): timed waits, sync primitive fixes, heap and RTC fixes, unattended-run switches 2026-09-26 19:00:39 -07:00
FileStream.hpp feat(libc): support C locale wide stream input 2026-10-01 11:59:11 +03:00
General.hpp fix(savedata): the native module keeps save directory params and mounts at /savedata<N> 2026-09-30 08:23:02 +03:00
GuestAllocations.hpp fix(libkernel): refuse fixed no-overwrite mappings over live memory with ENOMEM 2026-10-06 17:04:06 -05:00
GuestArena.hpp feat(agc): import shared direct memory through udmabuf on Linux 2026-10-07 23:09:16 +02:00
GuestDirectory.hpp feat(libc): translate guest directory enumeration 2026-09-25 06:41:55 +10:00
GuestHeap.hpp feat(libc): implement RaiseEv, catchReturnFromMain and reallocalign 2026-09-30 23:55:00 +00:00
GuestLocale.hpp feat(libc): implement collate<char>::_Getcat 2026-10-06 14:53:47 +02:00
GuestWriteWatch.hpp feat(agc): track guest memory writes on Linux with async userfaultfd write protection 2026-10-01 00:08:08 +13:00
HeapDiagnostics.hpp feat(libc): implement heap trace info 2026-09-27 11:43:36 +03:00
HostThreadLocal.hpp fix(agc): preserve recorder buffers through Windows thread teardown 2026-09-28 09:55:01 +10:00
PreciseWait.hpp refactor: strip explanatory comments to match repo conventions 2026-09-29 04:18:04 +03:00
Shutdown.hpp fix(kernel): orderly shutdown when closing the display window 2026-09-28 18:30:34 +03:00
VarArgsAbi.hpp refactor(libc): separate platform and compiler specifics in libc 2026-09-06 12:41:33 +03:00
WindowsFormatting.hpp fix(libc): keep wide printf precision on UTF-8 boundaries 2026-10-06 14:28:56 -07:00
WindowsMappings.hpp fix(libSceFiber): pin fiber contexts writable under write tracking on Windows 2026-10-07 11:25:48 +02:00
WindowsScanning.hpp fix(libc): translate Windows fscanf guest arguments 2026-10-06 13:45:10 -07:00
WindowsWideFormatting.hpp fix(libc): reject unsupported format extensions explicitly 2026-10-01 12:00:50 +03:00