fix(agc): check the guest address of ordered memory waits #16200
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16200"
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 MarcZX10 on 2026-11-05T20:40:13Z.
What
WAIT_REG_MEM/WAIT_REG_MEM_64packet that finds the draw pipeline busy reads its awaited guest address directly (Pm4::WaitSatisfiedUnchecked,OwnStoreRejects) withoutGuestMemory::CheckRange. An unmapped address faults the host instead of giving the guest-visible error that the other wait paths give.GuestMemory::CheckRangebefore the direct read, unless the range overlaps a queued write (the same condition that already gates the read).fix(agc): check the guest address of ordered memory waits.Tested
libSceAgcDriverare queued, not yet run.tools/check_conventions.py --base upstream/main(passed),git diff --check upstream/main.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-10T06:38:40Z.
Review: CHANGES_REQUESTED
The change itself looks right:
PacketExecution.cpp:327-329now callsGuestMemory::CheckRangebefore the direct read, the same check thekeepsDrawPipelinepath already does at line 99, and it is skipped when the range overlaps a queued write.One thing is missing:
WAIT_REG_MEM/WAIT_REG_MEM_64on an unmapped address while the draw pipeline is busy and checks the guest-visible error instead of a host fault, so it fails onmainand passes here. If that can't be built from the existing driver tests, show the failing log onmainand the fixed one.Also note #16897 edits the adjacent line 326; whichever lands second needs a rebase.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:37:31Z.
Review: COMMENTED
The trial merge onto
c1601e56d5was clean. The new validation runs before the unchecked ordered-wait read, and the queued-write path still defers the read as before. Please keep explicit coverage for both waiter widths and confirm the valid queued-write case still proceeds normally. My review is source-based.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.