Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-19T07:22:34Z.
What
agc_driver_guest_memory_lifetimefails onmainon RADV with:(the guest
munmapof the block after the lifetime checks returns nonzero)Bisect
16473dbbe~1(6970fb0b0, "test(agc): check that a trimmed host import keeps its write watch and guest bytes"): passes16473dbbe("perf(agc): keep the larger side of a host import cut inside its range"): fails — deterministic (3/3 solo), same assertionThe commit is part of the #6499 family ("perf/keep-import-across-split", merged as
fac38912d→f9caa0974→16473dbbe).Environment
BUILD_TESTING=ONtests/agc_driver_guest_memory_tests(lifetime suite), ~2 sNot the Mesa tessellation bug (#5444), not the BDA anchor regression (#7584), not the image-table vouch failure (#7766) — this is a fourth, separate failure. The suite currently has four failing tests on this machine, all bisected to distinct causes.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by root-over on 2026-10-19T10:17:28Z.
Same failure on an older AMD generation: AMD Ryzen 5 5625U iGPU (Vega, RADV RENOIR), Mesa 26.0.8, Ubuntu, kernel 7.0, GCC 15.2.0, Release. Passes with lavapipe on the same build.
452494439(good) and8816fd772(bad) lands on the #6499 merge64a9caa62(parentc1ca83479good), consistent with16473dbbeabove.git revert -m 1 64a9caa62onmain8816fd772: the test passes 3/3.-14isEFAULTfrom the amdgpu CS ioctl, which suggests a submission still references a userptr import whose pages were already unmapped or protected when the kept side of the cut was used, rather than themunmapitself failing first.Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-19T16:48:18Z.
An AMD proprietary driver data point: on
maindbac9fa15(which contains16473dbbe),agc_driver_guest_memory_lifetimeand its_copy,_direct,_locked,_heapand_heap_uncachedvariants pass 3 of 3 each undercteston an RX 6700 XT (gfx1031, RDNA 2), AMD's Windows driver 32.0.21045.5002, Windows 11 26200 (ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1).Windows maps and imports guest memory through a different path from Linux's
munmap, so this doesn't tell RADV apart from the Linux host side.Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-21T02:47:53Z.
A code reading that may explain root-over's
-14, onmaincd700fe9ec. I couldn't test it, since I have no RADV device.retireOrTrim, GuestBufferMemory.cpp L487-L510). Only the buffer is destroyed andbase/bytesnarrowed. TheVkDeviceMemoryis the original import's, over the whole original host range.reattachTrimmed(L1948) binds a new buffer into that same memory at an offset. So every later submission that uses the kept side still references the original host-pointer allocation, cut pages included.EFAULT(-14). That matches root-over's "The CS has been rejected (-14)" right before the assertion. Lavapipe, NVIDIA and AMD's Windows driver don't validate the whole range that way, which would explain why they pass.16473dbbe. Head and tail trims reuse the memory the same way, so the same rule may apply there. The lifetime checks pass for those cases today, so I'm not claiming they fail.@parl0v, happy to send this as a ready commit with a lavapipe test that checks no kept import's memory covers an unmapped cut, if that would help. It would need someone with RADV to confirm the fix.