[PR #1214] [MERGED] core: Fix some missing uses of ExecuteGuest. #1996

Closed
opened 2026-02-27 21:14:45 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1214
Author: @squidbus
Created: 10/3/2024
Status: Merged
Merged: 10/3/2024
Merged by: @georgemoralis

Base: mainHead: guest


📝 Commits (1)

  • 44cfd35 core: Fix some missing uses of ExecuteGuest.

📊 Changes

6 files changed (+30 additions, -19 deletions)

View changed files

📝 src/core/libraries/avplayer/avplayer_state.cpp (+2 -2)
📝 src/core/libraries/kernel/thread_management.cpp (+1 -1)
📝 src/core/libraries/network/net_ctl_obj.cpp (+2 -2)
📝 src/core/linker.cpp (+13 -9)
📝 src/core/linker.h (+11 -4)
📝 src/core/module.cpp (+1 -1)

📄 Description

  • Adds missing ExecuteGuest wrapping to some jumps to guest code, for running the main entrypoint and using the heap API.
  • Adds an ExecuteGuestWithoutTls private helper to allow performing any non-TLS related guest wrapping that may be needed, since using ExecuteGuest for TLS allocations would be infinitely recursive.
  • Marks ExecuteGuest and associated functions as const since they don't modify Linker state.

This is more prep work for swapping the FS segment on Linux for TCB accesses. The guest-to-host wrapping and segment swap aren't in yet as there are still some roadblocks like getting the templated HLE wrapper to work with varargs functions.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/1214 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 10/3/2024 **Status:** ✅ Merged **Merged:** 10/3/2024 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `guest` --- ### 📝 Commits (1) - [`44cfd35`](https://github.com/shadps4-emu/shadPS4/commit/44cfd35fef20d69b1be03e34175f9ce8ff678e11) core: Fix some missing uses of ExecuteGuest. ### 📊 Changes **6 files changed** (+30 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/avplayer/avplayer_state.cpp` (+2 -2) 📝 `src/core/libraries/kernel/thread_management.cpp` (+1 -1) 📝 `src/core/libraries/network/net_ctl_obj.cpp` (+2 -2) 📝 `src/core/linker.cpp` (+13 -9) 📝 `src/core/linker.h` (+11 -4) 📝 `src/core/module.cpp` (+1 -1) </details> ### 📄 Description * Adds missing `ExecuteGuest` wrapping to some jumps to guest code, for running the main entrypoint and using the heap API. * Adds an `ExecuteGuestWithoutTls` private helper to allow performing any non-TLS related guest wrapping that may be needed, since using `ExecuteGuest` for TLS allocations would be infinitely recursive. * Marks `ExecuteGuest` and associated functions as const since they don't modify `Linker` state. This is more prep work for swapping the FS segment on Linux for TCB accesses. The guest-to-host wrapping and segment swap aren't in yet as there are still some roadblocks like getting the templated HLE wrapper to work with varargs functions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:14:45 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#1996
No description provided.