Tony Wasserka
02c00a87dd
LinuxSyscalls: Track MappedResources only for regular files that are executable
2025-10-20 18:00:25 +02:00
Tony Wasserka
6c77bc12c1
LinuxSyscalls: Don't skip MappedResource creation on path query failure
...
MarkGuestExecutableRange requires a MappedResource to be available even when
FEX doesn't do anything else with it.
2025-10-20 18:00:25 +02:00
Ryan Houdek
3c6246f99a
SignalDelegator: Remove bool for deferring signals
...
Useful while deferred signals were still a bit more fragile but I
haven't touched this in quite a while no, so just deleted.
2025-10-13 16:47:42 -07:00
Ryan Houdek
072e7bd241
Merge pull request #4973 from pmatos/fix/fcntl64_409
...
Add F_ADD_SEALS and F_GET_SEALS support to 32-bit fcntl
2025-10-13 11:01:42 -07:00
Ryan Houdek
4080dca816
Merge pull request #4966 from Sonicadvance1/name_remaining
...
FEX: Name remaining allocations as "Misc"
2025-10-13 10:55:04 -07:00
Ryan Houdek
c22fb80129
Merge pull request #4964 from lioncash/vma
...
SyscallsVMATracking: Make list management internally linked
2025-10-13 10:54:31 -07:00
Paulo Matos
123fcd4bea
Add F_ADD_SEALS and F_GET_SEALS support to 32-bit fcntl
...
Fixes crash with "Unhandled fcntl64: 0x409"
Seen with steam running Bayonetta with Proton Experimental.
2025-10-13 15:27:33 +02:00
Ryan Houdek
474f2dc267
FEX: Name remaining allocations as "Misc"
...
This captures the remaining FEX allocations that /aren't/ coming from
JEMalloc, allowing us to separate our mapped regions versus just
jemalloc allocations.
With some additional naming in jemalloc (which I'm not adding here) this
gets us interesting results:
```
Misc resident: 54 MiB
JEMalloc resident: 208 MiB
```
So 208MB of active jemalloc allocations in this particular case. These will be able to be tracked in heaptrack-like applications if careful.
This should let us target down whatever live allocations we're keeping
large amounts of data around if possible.
2025-10-10 17:34:03 -07:00
Lioncache
10835c4b62
SyscallsVMATracking: Make list management internally linked
...
These don't require being bound to class state directly, and so the list
management can be completely opaque to the outside (also means less
rebuilding if these change)
2025-10-10 15:36:46 -04:00
Lioncache
3e741df77b
SyscallHandler: Avoid self-referencing global
...
We don't need to indirect through the handler global inside of the class
itself for instance member functions.
2025-10-10 15:29:29 -04:00
Lioncache
987fc925ee
FileManagement: Use emplace instead of insert for set
...
These are cases where the string can be directly constructed internally
instead of being copied/moved.
2025-10-09 22:02:06 -04:00
Lioncache
b6cbb23781
FileManagement: Make use of std::string_view in LoadThunkDatabase()
...
Same behavior, but avoids allocating except for the case where its
necessary.
2025-10-09 22:02:03 -04:00
Lioncache
17d110575c
BPFEmitter: Remove unused SeccopEmulator include
2025-10-09 00:57:49 -04:00
Lioncache
a967976420
BPFEmitter: Simplify iterator declarations
...
Makes the jump labels a little quicker to read.
2025-10-09 00:57:49 -04:00
Lioncache
7e1e1ccccc
BPFEmitter: Move private API into implementation
...
Keeps some internals fully private (and also avoids dumping
some defines into other headers).
2025-10-09 00:57:49 -04:00
Ryan Houdek
673e826e46
FEX: Remove InlineSyscall and related flags
...
FEXCore no longer optimizes syscalls to be inline.
NFC, just avoids passing around a bunch of data structures for no
reason.
2025-10-08 19:33:58 -07:00
Ryan Houdek
3b88947cbe
Merge pull request #4950 from lioncash/syscall
...
SyscallHandler: Shrink definition struct from 24 to 16 bytes
2025-10-08 14:03:57 -07:00
Lioncache
10c3b2fb5d
SyscallHandler: Shrink definition struct from 24 to 16 bytes
...
Just a minor space saving, given how many syscall definitions we'll
have.
2025-10-08 16:40:20 -04:00
Lioncache
a2445904e7
ThreadManager: Make StatAlloc instance private
...
This doesn't need to be public.
2025-10-08 16:13:23 -04:00
Lioncache
d94b9fae94
SourceCodeResolver: Pass string_view by value for GenerateMap()
...
Generally this should be passed as a value type unless there's a good
reason not to.
2025-10-07 01:27:15 -04:00
Lioncache
05fcaaa758
Syscalls: Remove unimplemented prototypes
2025-10-07 01:27:11 -04:00
Ryan Houdek
2cab87fbd0
ThreadManager: Fix mmap usage to not take guest space
...
SHM stats and CallRet stack was accidentally using system mmap which
means it would take VA space from the guest. Ensure it uses the
Allocator helpers so that doesn't happen.
Gives 32-bit guests 8-ish megabyte of VA space back.
2025-10-06 11:20:00 -07:00
Ryan Houdek
b08e5f9821
Linux: Implement support for extended volatile metadata
...
Allows applications running entirely under Linux to use the same
extended volatile metadata as Windows.
For example `FEX_EXTENDEDVOLATILEMETADATA=iw4sp.exe\;0xe9da0-0xe9ec7`
this configuration works for both wow64 and Linux to disable the TSO
emulation on the memcpy routine in that game that consumes around 80% of
CPU time in TSO emulation.
Works with Linux native games as well of course.
2025-09-29 14:36:51 -07:00
Ryan Houdek
dd4f508b77
FEX: Fixes SIGILL reporting
...
Two bug fixes here.
- We weren't reporting a correctl ErrorRegister. Needs to contain
PF_INSTR at least.
- We weren't setting siginfo->si_addr in the case of `FaultToTopAndGeneratedException`
Fixes Mafia 2 (Classic)
2025-09-18 11:26:15 -07:00
Tony Wasserka
3058a825b7
Merge pull request #4889 from Sonicadvance1/fix_x87_state_saverestore
...
SignalDelegator: Correctly save and restore x87 state.
2025-09-17 11:53:42 +02:00
LC
8f47b46219
Merge pull request #4887 from Sonicadvance1/finish_v4l2
...
IoctlEmulation: Finish v4l2 implementation
2025-09-16 10:00:56 +02:00
Ryan Houdek
de6d907e27
SignalDelegator: Correctly save and restore x87 state.
...
We need to read the current x87 TOP location and rotate the values when
saving and restoring the context state on Linux. Wasn't visible in the
ASM tests since we read the FEX's CPU state directly there.
2025-09-15 13:20:43 -07:00
Ryan Houdek
85e67f92c5
FEX: Rebrand FEXInterpreter as FEX
...
Still creates a copy of FEXInterpreter from FEX for downstream projects
to have some time to get off the old name. Creating a symlink is kind of
a pain in cmake so just doing an install copy is easy.
2025-09-15 13:06:48 -07:00
Ryan Houdek
6ced309c5c
IoctlEmulation: Finish v4l2 implementation
2025-09-12 19:59:56 -07:00
Ryan Houdek
7273041314
FEXInterpreter: Remove FEXLoader
...
Doesn't /quite/ remove the ArgumentLoader because it is intertwined with
LinuxEmulation in an annoying way that will take another step to remove.
2025-09-12 10:24:58 -07:00
Ryan Houdek
61719115e5
Merge pull request #4817 from neobrain/refactor_code_cache_new_interfaces
...
CodeCache: Introduce new interfaces
2025-09-11 12:59:33 -07:00
Tony Wasserka
70a1d92d9f
CodeCache: Drop ComputeCodeMapId member function
2025-09-11 17:03:50 +02:00
Tony Wasserka
0749477eb9
CodeCache: Introduce revamped interfaces
2025-09-11 17:03:50 +02:00
Tony Wasserka
bf1b76dcd2
LinuxSyscalls: Clean up MappedResource insertion
...
None of the call sites needed this to be a template, and the previous function
produced unreadable error messages.
2025-09-11 10:49:07 +02:00
Tony Wasserka
9fdd96af61
Update code formatting
2025-09-11 10:40:29 +02:00
Tony Wasserka
fee9e91c4f
Core: Drop support for TSO auto migration
2025-09-10 15:36:23 +02:00
Ryan Houdek
317f92f4c8
Merge pull request #4851 from lioncash/ir
...
IR: Remove unnecessary forward declarations/headers
2025-09-08 19:47:51 -07:00
Lioncache
b2407352a9
IR: Remove unnecessary forward declarations/headers
...
Pares the base IR header down to a modest size and also reveals a few indirect
reliances on the allocator facilities.
2025-09-08 22:03:25 -04:00
Lioncache
e1b5e3e112
VDSO_Emulator: Cull unnecessary includes
...
Reveals a bunch of indirect includes inside the SignalDelegator.
2025-09-08 21:43:31 -04:00
Ryan Houdek
e9f8c01e04
Merge pull request #4848 from lioncash/thread
...
InternalThreadState: Remove unused includes
2025-09-08 16:59:15 -07:00
Lioncache
1e03219ca3
Syscalls/Thread: Add missing forward declarations
...
Currently we were lucky that these were being seen already when being included.
2025-09-08 14:58:30 -04:00
Lioncache
de8b4438e3
ThreadManager: Eliminate indirect inclusions
...
We had quite a bit of dependencies that were currently being indirectly relied upon.
We can forward declare the relevant ones and add the includes for the ones that are
explicit.
2025-09-08 14:58:27 -04:00
Lioncache
6b2363d3f6
InternalThreadState: Remove unused headers
...
Removes some includes in the core header and resolves indirect includes elsewhere.
2025-09-08 14:13:01 -04:00
Lioncache
ecc526a9d8
CodeLoader: Make GetApplicationArguments() return by reference
...
We don't really need to make this potentially return a null pointer when we could always return a valid instance
that would just happen to be empty if unused.
2025-09-08 12:07:19 -04:00
Lioncache
436f4aa953
CodeLoader: Make GetExecveArguments() return by value
...
Same behavior, but more straightforward.
2025-09-08 12:07:19 -04:00
Lioncache
fd10ce0600
CodeLoader: Return auxv results by value
...
Same behavior, but without the need to care about out values.
2025-09-08 12:07:14 -04:00
Lioncache
1f756fb386
General: Replace usages of .at(0) with .data() where applicable
...
This is generally more straightforward in cases where bounds checking isn't necessary.
2025-09-02 13:03:37 -04:00
Ryan Houdek
ae90040ed2
Merge pull request #4810 from lioncash/file
...
FileManagement: Minor interface cleanup
2025-09-01 14:39:48 -07:00
Lioncache
d4e679432c
FileManagement: Add missing includes
...
Gets rid of a few indirect dependencies.
2025-08-29 13:42:17 -04:00
Lioncache
54c8cb9fd7
FileManagement: Mark helper functions as const where applicable
...
These don't modify internal class state, so we can mark them as such.
2025-08-29 13:41:58 -04:00