refactor(agc): share the PROCMAP_QUERY lookup with GuestMemory #3454
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3454"
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 GustavoGamarra95 on 2026-10-11T10:55:59Z.
What
Follow-up to #3227, as suggested in its review:
GuestMemory.cppcarried its ownprocmap_queryfallback and aProcMapsQueryFdthat duplicatedHostMapping::QueryFd. Both opened/proc/self/mapsonce, probedPROCMAP_QUERYand honouredAPS5_NO_PROCMAP_QUERY.HostMapping.hpp's fallback, used when the kernel headers lackPROCMAP_QUERY, now also definesPROCMAP_QUERY_VMA_READABLEandPROCMAP_QUERY_VMA_WRITABLE, whichGuestMemory.cppreads from the query result.GuestMemory.cppincludesHostMapping.hppand callsHostMapping::QueryFd. Its copy of the struct, the constants and the probe goes away (2 lines added, 46 removed). The queries and the fallback scan are unchanged.Overlap: #1330 touches the same lines of
GuestMemory.cpp(the struct and the probe), and #1810 touches a neighbouring line indescribePages. Whichever lands later needs a small rebase.Tested
Arch Linux, kernel 7.2.9, GCC 16.2.1, Release with
-DANYPS5_ENABLE_SPIRV_TOOLS=ON, onmain74981fab, RTX 3050 Laptop:ctest -R "^agc_|guest_sysmodule|unwind|module_info": 383/383 passed.guest_sysmodule, withAPS5_NO_PROCMAP_QUERY=1: 26/26 passed.check_test_registration.pyandcheck_conventions.pypass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T11:00:42Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppL591-592Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T11:45:39Z.
Checked the diff: the removed
procmap_querystruct, constants andProcMapsQueryFdare identical toHostMapping::QueryFdand the fallback inHostMapping.hpp(same probe, sameAPS5_NO_PROCMAP_QUERYswitch, same queries). Built the AgcDriver and libc scopes and ran the guest memory, write-watch and sysmodule tests; all pass. Merging.