gpu: read sparse backing when uploading buffer copies #1144

Closed
github-bot wants to merge 2 commits from gh-pr/1144/head into gh-pr/1144/base
Owner

@⁠NeySlim on GitHub · 2026-10-07 14:45 UTC · original
NeySlim:fix/prt-sparse-upload → main · +105 −3 · 2 files · 2 commits · closed without merging

Problem

God of War Ragnarök (PPSA08332, 05.005) stops a few minutes into boot with:

memory tracker re-entered from upload callback
 in src/graphics/host_gpu/memoryTracker.h:113

The game calls sceKernelSetPrtAperture with addr = 0x1000000000, len = 0x7600000000. KernelSetPrtAperture registers the whole aperture as GPU memory (MapGpuRange), but only some of its pages are resident. PrepareBda then synchronizes every buffer in the mapped ranges. When a buffer covers a non-resident page, UploadCopies runs memcpy on a reserved, inaccessible host page from inside ForEachUploadRange. The read fault goes through HandleFault to BufferCache::ReadMemory, which re-enters the tracker:

MemoryTracker::CheckNotInUploadCallback
MemoryTracker::ForEachDownloadRange
BufferCache::DownloadBufferMemory
BufferCache::ReadMemory
RenderContext::HandleFault                 (PageFaultAccess::Read)
<signal handler>
BufferCache::UploadCopies                  (memcpy)
MemoryTracker::ForEachUploadRange
BufferCache::SynchronizeBuffer
BufferCache::SynchronizeBuffersInRange
RenderContext::PrepareBda

The faulting address was in a ---p host mapping (reserved, nothing mapped), about 0.8 MiB before the first resident page of the buffer.

#227 (Stray) reports the same assertion. I have not checked whether it has the same cause.

Change

UploadCopies reads guest bytes through TryReadBacking first, then TryReadSparseBacking. Non-resident pages read as zero, as in the existing image upload path in BufferCache. The plain memcpy remains as a fallback for mappings without a backing alias, such as private flexible memory.

The copies cover CPU-dirty ranges only, so the backing store holds the current bytes for them.

Test

New BufferCachePrtHoleUpload in ShaderRecompilerComputeTests. It reserves 4 MiB at 0x1000000000, registers it as PRT aperture 0 and maps 64 KiB of direct memory at +0x10000. It then obtains a 128 KiB read-only buffer at the start of the aperture and checks:

  • the non-resident head uploads as zero;
  • the resident page keeps its contents.

It runs in the full suite next to BufferCacheDirtyGarbageCollection (Windows block), and on its own with --buffer-cache-prt-only.

Validation

Linux, AMD Radeon 8060S (RDNA 3.5), Mesa RADV 26.2.3.

  • --buffer-cache-prt-only: passes. Without the change, the test crashes on the read fault (SIGSEGV in this harness, which has no guest fault handler).
  • I ran each of the 543 cases of shader_recompiler_compute_tests in its own process, with and without the change: identical results. On this setup, 12 cases fail on main either way (10 unrelated, plus the 2 BranchVccnz* cases fixed by #1143).
  • God of War Ragnarök: the assertion is gone. With my other pending fixes, the game runs for 5 minutes and shows its first setup screen.

Not tested on Windows. TryReadBacking, TryReadSparseBacking and the mapping table they read are shared by both platforms, and a read of a reserved page faults through the same handler there. The test only uses the emulated kernel calls and Vulkan transfers.

AI use

I used Claude Code (AI agent) to investigate the crash, write the change and the test, and run the tests above on my machine. I reviewed the diff and the results before opening this PR.

**@⁠NeySlim** on GitHub · 2026-10-07 14:45 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1144) `NeySlim:fix/prt-sparse-upload` → `main` · +105 −3 · 2 files · 2 commits · closed without merging ## Problem God of War Ragnarök (PPSA08332, 05.005) stops a few minutes into boot with: ``` memory tracker re-entered from upload callback in src/graphics/host_gpu/memoryTracker.h:113 ``` The game calls `sceKernelSetPrtAperture` with `addr = 0x1000000000, len = 0x7600000000`. `KernelSetPrtAperture` registers the whole aperture as GPU memory (`MapGpuRange`), but only some of its pages are resident. `PrepareBda` then synchronizes every buffer in the mapped ranges. When a buffer covers a non-resident page, `UploadCopies` runs `memcpy` on a reserved, inaccessible host page from inside `ForEachUploadRange`. The read fault goes through `HandleFault` to `BufferCache::ReadMemory`, which re-enters the tracker: ``` MemoryTracker::CheckNotInUploadCallback MemoryTracker::ForEachDownloadRange BufferCache::DownloadBufferMemory BufferCache::ReadMemory RenderContext::HandleFault (PageFaultAccess::Read) <signal handler> BufferCache::UploadCopies (memcpy) MemoryTracker::ForEachUploadRange BufferCache::SynchronizeBuffer BufferCache::SynchronizeBuffersInRange RenderContext::PrepareBda ``` The faulting address was in a `---p` host mapping (reserved, nothing mapped), about 0.8 MiB before the first resident page of the buffer. #227 (Stray) reports the same assertion. I have not checked whether it has the same cause. ## Change `UploadCopies` reads guest bytes through `TryReadBacking` first, then `TryReadSparseBacking`. Non-resident pages read as zero, as in the existing image upload path in `BufferCache`. The plain `memcpy` remains as a fallback for mappings without a backing alias, such as private flexible memory. The copies cover CPU-dirty ranges only, so the backing store holds the current bytes for them. ## Test New `BufferCachePrtHoleUpload` in `ShaderRecompilerComputeTests`. It reserves 4 MiB at `0x1000000000`, registers it as PRT aperture 0 and maps 64 KiB of direct memory at `+0x10000`. It then obtains a 128 KiB read-only buffer at the start of the aperture and checks: - the non-resident head uploads as zero; - the resident page keeps its contents. It runs in the full suite next to `BufferCacheDirtyGarbageCollection` (Windows block), and on its own with `--buffer-cache-prt-only`. ## Validation Linux, AMD Radeon 8060S (RDNA 3.5), Mesa RADV 26.2.3. - `--buffer-cache-prt-only`: passes. Without the change, the test crashes on the read fault (SIGSEGV in this harness, which has no guest fault handler). - I ran each of the 543 cases of `shader_recompiler_compute_tests` in its own process, with and without the change: identical results. On this setup, 12 cases fail on main either way (10 unrelated, plus the 2 `BranchVccnz*` cases fixed by #1143). - God of War Ragnarök: the assertion is gone. With my other pending fixes, the game runs for 5 minutes and shows its first setup screen. Not tested on Windows. `TryReadBacking`, `TryReadSparseBacking` and the mapping table they read are shared by both platforms, and a read of a reserved page faults through the same handler there. The test only uses the emulated kernel calls and Vulkan transfers. ## AI use I used Claude Code (AI agent) to investigate the crash, write the change and the test, and run the tests above on my machine. I reviewed the diff and the results before opening this PR.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:44:52 +00:00
github-bot closed this pull request 2026-11-26 09:44:52 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-07 14:49 UTC · original · edited 2026-10-07 16:14 UTC

Review in Change Stack →

📝 Walkthrough

Walkthrough

UploadCopies now reads through backing storage, then sparse backing, before falling back to a direct host-memory copy. The same read path serves staging-buffer and temporary-buffer uploads. A new PRT aperture test checks that reads from non-resident pages return zero and that a resident page retains its initialized value. The test has a dedicated command-line selector and runs in the default test sequence.

Suggested reviewers: nmzik

Priority: ⬆️ High

Change: Bug fix

Merge Risk: 🟡 Moderate · up to a7468

An unowned PRT aperture can still crash buffer synchronization; reject such apertures before mapping.

🚥 Pre-merge checks | ✅ 4 | ❓ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ❓ Inconclusive Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: reading sparse backing during GPU buffer-copy uploads.
Description check ✅ Passed The description directly explains the PRT aperture fault, the UploadCopies change, the new test, and validation results.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 too large.)

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-07 14:49 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1144#issuecomment-6040513082) · edited 2026-10-07 16:14 UTC <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/1144?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=2" alt="Review in Change Stack →" width="220" height="32"></a> <!-- review_stack_entry_end --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough `UploadCopies` now reads through backing storage, then sparse backing, before falling back to a direct host-memory copy. The same read path serves staging-buffer and temporary-buffer uploads. A new PRT aperture test checks that reads from non-resident pages return zero and that a resident page retains its initialized value. The test has a dedicated command-line selector and runs in the default test sequence. **Suggested reviewers:** `nmzik` </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ⬆️ High <!-- change_assessment_commit:"a746839a2c38d9b492bc26aee22b372763150984" --> **Change:** Bug fix <!-- change_assessment_end --> <!-- final_review_risk_start --> **Merge Risk:** _🟡 Moderate_ · up to `a7468` <!-- final_review_risk_coverage:{"sourceCommitId":"a746839a2c38d9b492bc26aee22b372763150984","coveredCommitId":"a746839a2c38d9b492bc26aee22b372763150984","kind":"reviewed"} --> An unowned PRT aperture can still crash buffer synchronization; reject such apertures before mapping. <!-- final_review_risk_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary>🚥 Pre-merge checks | ✅ 4 | ❓ 1</summary> ### ❌ Failed checks (1 inconclusive) | Check name | Status | Explanation | Resolution | | :----------------: | :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ❓ Inconclusive | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary>✅ Passed checks (4 passed)</summary> | Check name | Status | Explanation | | :------------------------: | :------- | :----------------------------------------------------------------------------------------------------------------------- | | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Title check | ✅ Passed | The title clearly and concisely describes the main change: reading sparse backing during GPU buffer-copy uploads. | | Description check | ✅ Passed | The description directly explains the PRT aperture fault, the UploadCopies change, the new test, and validation results. | </details> <details> <summary>Full details: Docstring Coverage</summary> **Explanation** Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 too large.) </details> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- autopilot:start --> - [ ] <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autopilot</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts <!-- autopilot:end --> <!-- tips_start --> --- Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=1144)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-07 14:49 UTC · original · reviewed

🧹 Nitpick comments (1)
tests/ShaderRecompilerComputeTests.cpp (1)

41739-41739: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Run the PRT test in the cross-platform full suite.

On Linux, the full-suite path excludes this call through the Windows preprocessor guard. The test uses generic memory APIs and Vulkan buffer transfers. It does not require rasterization support.

Suggested fix
-    vulkan.CheckBufferCachePrtHoleUpload();
 #endif
   } else {
     skipped_device_checks = true;
   }
+  vulkan.CheckBufferCachePrtHoleUpload();

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2e60c8bb-c9ec-4882-9634-d3b17309c366
📥 Commits

Reviewing files that changed from the base of the PR and between d2413fc2eb and 3e63b9ae7e.

📒 Files selected for processing (2)
  • src/graphics/host_gpu/renderer/cache/bufferCache.cpp
  • tests/ShaderRecompilerComputeTests.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-07 14:49 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1144#pullrequestreview-5444116650) · **reviewed** <details> <summary>🧹 Nitpick comments (1)</summary><blockquote> <details> <summary>tests/ShaderRecompilerComputeTests.cpp (1)</summary><blockquote> `41739-41739`: **📐 Maintainability & Code Quality** | **🔵 Trivial** | **⚡ Quick win** **Run the PRT test in the cross-platform full suite.** On Linux, the full-suite path excludes this call through the Windows preprocessor guard. The test uses generic memory APIs and Vulkan buffer transfers. It does not require rasterization support. <details> <summary>Suggested fix</summary> ```diff - vulkan.CheckBufferCachePrtHoleUpload(); #endif } else { skipped_device_checks = true; } + vulkan.CheckBufferCachePrtHoleUpload(); ``` </details> <!-- cr-comment:v1:ace01cfedcf2634d794ec530 --> </blockquote></details> </blockquote></details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `2e60c8bb-c9ec-4882-9634-d3b17309c366` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between d2413fc2ebd91d1b7234197c2dd5bd48e1cb6a51 and 3e63b9ae7e97c32f4bbbcd230a3b8289091a2e50. </details> <details> <summary>📒 Files selected for processing (2)</summary> * `src/graphics/host_gpu/renderer/cache/bufferCache.cpp` * `tests/ShaderRecompilerComputeTests.cpp` </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review. </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=e915c8b4-e0ce-4f03-8046-ba7f51cddf25 attempt=eaee33d1-e2c9-4598-b2f0-09fa68bd282a batch=1/1 -->
Author
Owner

@⁠NeySlim on GitHub · 2026-10-07 15:59 UTC · original

Done in a746839. The check now runs with the other platform-independent checks, outside the rasterization and Windows block. It passes on Linux in the full sequence.

**@⁠NeySlim** on GitHub · 2026-10-07 15:59 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1144#issuecomment-6041678365) Done in a746839. The check now runs with the other platform-independent checks, outside the rasterization and Windows block. It passes on Linux in the full sequence.
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-07 16:13 UTC · original · reviewed

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟠 Major · Reject unowned PRT apertures before MapGpuRange. · bufferCache.cpp:423-428

src/graphics/host_gpu/renderer/cache/bufferCache.cpp:423-428
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Reject unowned PRT apertures before MapGpuRange.

KernelSetPrtAperture accepts an aligned range without checking guest ownership. A new memory-tracker region starts CPU-dirty, so ObtainBuffer can send a nonresident range to UploadCopies. TryReadBacking cannot read the nonresident page, and TryReadSparseBacking returns false for an unowned range. The fallback then dereferences the unmapped guest address and can fault.

Require ownership before recording and mapping the aperture.

Suggested fix
 	if (len != 0 && (address == 0 || (address & (PRT_PAGE_SIZE - 1u)) != 0 ||
 	                 (len & (PRT_PAGE_SIZE - 1u)) != 0 || address < PRT_APERTURE_START ||
 	                 len > PRT_APERTURE_END - address)) {
 		return KERNEL_ERROR_EINVAL;
 	}
+	if (len != 0 && (g_guest_address_space == nullptr ||
+	                 !g_guest_address_space->Owns(address, static_cast<uint64_t>(len)))) {
+		return KERNEL_ERROR_EINVAL;
+	}
 
 	PrtAperture old {};

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 97b6a3ee-e269-4da5-879e-909292b30de2
📥 Commits

Reviewing files that changed from the base of the PR and between 3e63b9ae7e and a746839a2c.

📒 Files selected for processing (1)
  • tests/ShaderRecompilerComputeTests.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-07 16:13 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1144#pullrequestreview-5445093010) · **reviewed** > [!CAUTION] > Some comments are outside the diff and can’t be posted inline due to GitHub limitations. > > **⚠️ Outside diff range comments (1)** > > <details> > <summary><strong>🟠 Major</strong> · Reject unowned PRT apertures before <code>MapGpuRange</code>. · <code>bufferCache.cpp:423-428</code></summary><blockquote> > > `src/graphics/host_gpu/renderer/cache/bufferCache.cpp:423-428` > **🩺 Stability & Availability** | **🟠 Major** | **⚡ Quick win** > > **Reject unowned PRT apertures before `MapGpuRange`.** > > `KernelSetPrtAperture` accepts an aligned range without checking guest ownership. A new memory-tracker region starts CPU-dirty, so `ObtainBuffer` can send a nonresident range to `UploadCopies`. `TryReadBacking` cannot read the nonresident page, and `TryReadSparseBacking` returns `false` for an unowned range. The fallback then dereferences the unmapped guest address and can fault. > > Require ownership before recording and mapping the aperture. > > <details><summary>Suggested fix</summary> > > ```diff > if (len != 0 && (address == 0 || (address & (PRT_PAGE_SIZE - 1u)) != 0 || > (len & (PRT_PAGE_SIZE - 1u)) != 0 || address < PRT_APERTURE_START || > len > PRT_APERTURE_END - address)) { > return KERNEL_ERROR_EINVAL; > } > + if (len != 0 && (g_guest_address_space == nullptr || > + !g_guest_address_space->Owns(address, static_cast<uint64_t>(len)))) { > + return KERNEL_ERROR_EINVAL; > + } > > PrtAperture old {}; > ``` > > </details> > > <!-- cr-comment:v1:d259bcfa7320db90e45df41f --> > > </blockquote></details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> - **Configuration used**: Repository: KytyPS5/KytyPS5/.coderabbit.yaml - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `97b6a3ee-e269-4da5-879e-909292b30de2` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 3e63b9ae7e97c32f4bbbcd230a3b8289091a2e50 and a746839a2c38d9b492bc26aee22b372763150984. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `tests/ShaderRecompilerComputeTests.cpp` </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review. </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=ee367172-40d0-407d-af1b-00e54f3e0896 attempt=8a349fb5-de02-4017-8fc0-71acc005447f batch=1/1 -->
Author
Owner

@⁠NeySlim on GitHub · 2026-10-07 22:00 UTC · original

The aperture window [0x0f00000000, 0xfc00000000) sits inside the guest-owned address space here: for God of War Ragnarök's sceKernelSetPrtAperture(0x1000000000, 0x7600000000), g_guest_address_space->Owns() returns true. I don't have a hardware or SDK reference saying the call must fail on an unreserved range, so I'd rather not add a new EINVAL path to KernelSetPrtAperture in this PR. It is outside this change and could reject calls that work on hardware.

**@⁠NeySlim** on GitHub · 2026-10-07 22:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1144#issuecomment-6047711174) The aperture window `[0x0f00000000, 0xfc00000000)` sits inside the guest-owned address space here: for God of War Ragnarök's `sceKernelSetPrtAperture(0x1000000000, 0x7600000000)`, `g_guest_address_space->Owns()` returns true. I don't have a hardware or SDK reference saying the call must fail on an unreserved range, so I'd rather not add a new EINVAL path to `KernelSetPrtAperture` in this PR. It is outside this change and could reject calls that work on hardware.
Author
Owner

@⁠NeySlim on GitHub · 2026-10-14 06:17 UTC · original

Covered by 40692dfb on main, the PRT hole upload test passes there without this change. Closing.

**@⁠NeySlim** on GitHub · 2026-10-14 06:17 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1144#issuecomment-6162199835) Covered by 40692dfb on main, the PRT hole upload test passes there without this change. Closing.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.