Ryan Houdek
674efc69c4
FEX: Print a log when kernel unaligned atomics are used
2025-10-28 23:53:15 +00:00
Billy Laws
38049c5281
Windows: Enable downstream kernel-side unaligned atomic handling
2025-10-28 23:53:15 +00:00
Billy Laws
7c207080a4
Windows: Support new two-stage invalidation model
2025-10-28 23:53:12 +00:00
LC
3c554cd787
Merge pull request #4992 from Sonicadvance1/Remove_the_paranoia
...
FEXCore: Remove Paranoid TSO mode.
2025-10-22 10:05:48 -04:00
LC
9e5f2269d9
Merge pull request #4990 from Sonicadvance1/gettls
...
wow64/arm64ec: Call GetTLS less frequently
2025-10-21 23:53:36 -04:00
Ryan Houdek
81fc502c6c
FEXCore: Remove Paranoid TSO mode.
...
This mode has been broken for a long time because it's mostly untested.
Barriers, and backpatching while slow have proven that they work.
Maintain the one TSO path, at least until all ARM hardware gains support for
x86-TSO memory model mode.
2025-10-21 10:53:34 -07:00
Ryan Houdek
643dd56b74
FEX: Removes sone hardcoded 4096 constants
...
Use our defined variable instead.
2025-10-21 09:18:07 -07:00
Ryan Houdek
b40e707771
wow64/arm64ec: Call GetTLS less frequently
...
If called back-to-back, the compiler can't optimize the object creation
resulting in multiple indirections. Save the creation and pass it
around, allowing the compiler to merge loadstores, and remove redundant
loads.
NFC
2025-10-20 15:45:31 -07:00
Jacek Caban
5fd3852fd3
ARM64EC: Emulate unaligned atomic access in non-JIT EC code
2025-10-10 00:13:56 +02: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
Billy Laws
70cffce5eb
Windows: Avoid redeclaring strtoll as unimplemented
...
Included as part of the musl code we pull in. Fixes ARM64EC/WOW64 FEX.
2025-10-03 16:30:41 +02:00
LC
18d0dec416
Merge pull request #4911 from Sonicadvance1/evmd_linux
...
Linux: Implement support for extended volatile metadata
2025-09-30 20:01:26 -04:00
Ryan Houdek
1758648f56
Common: Move ApplyFEXExtendedVolatileMetadata to Common
...
It is going to be used by Linux.
Also adds support for file offset handling, which is required on Linux
but not on win32.
2025-09-29 14:36:50 -07:00
Ryan Houdek
418ce0aed9
Wow64: Ensure extended volatile metadata is removed
...
Was missing this, matches the arm64ec side.
2025-09-29 14:13:44 -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
Ryan Houdek
0eedd55dfd
Merge pull request #4866 from neobrain/refactor_reformat
...
Update code formatting
2025-09-11 10:13:42 -07:00
Tony Wasserka
0749477eb9
CodeCache: Introduce revamped interfaces
2025-09-11 17:03:50 +02:00
Tony Wasserka
9fdd96af61
Update code formatting
2025-09-11 10:40:29 +02:00
Tony Wasserka
0c0a1d8f12
CMake: Use consistent component naming
2025-09-11 10:31:06 +02:00
Tony Wasserka
fee9e91c4f
Core: Drop support for TSO auto migration
2025-09-10 15:36:23 +02:00
Billy Laws
782952d55d
WOW64: Fix CsSeg initialization
2025-09-09 19:10:07 +01:00
Ryan Houdek
80cacc462e
X86Tables: Move x87 tables to be constexpr
2025-08-27 12:24:25 -07:00
Ryan Houdek
f050571696
Implement support for additional provided volatile metadata
...
Only wired up for wow64 and arm64ec. Gives more granular control over
TSO enabling and disabling. Matches arm64ec volatile metadata except
with one more additional feature that whole modules can be disabled at a
time.
Once we know the mapped size of files in Linux then we'll be able to do
the same thing there, but there's not a full mechanism wired up for that
yet.
2025-08-22 15:03:56 -07:00
LC
4f84c281ef
Merge pull request #4791 from bylaws/norace
...
ARM64EC: Cooperatively suspend if needed when leaving the JIT
2025-08-22 12:21:09 -04:00
Billy Laws
827015a8e3
ARM64EC: Cooperatively suspend if needed when leaving the JIT
2025-08-21 17:24:56 +01:00
Billy Laws
a379818386
WinAPI: Force WOW64 allocations to start >4GB
...
Avoids stealing address space from the guest.
2025-08-21 17:19:46 +01:00
Ryan Houdek
83e44961fc
Merge pull request #4784 from Sonicadvance1/more_ldt_gdt
...
FEXCore: Move LDT/GDT management to the frontend
2025-08-20 13:22:08 -07:00
Ryan Houdek
25a0752e58
FEXCore: Move LDT/GDT management to the frontend
...
This will allow the frontend to manage LDT and GDT so that Linux will be
able to install 32-bit code segments.
2025-08-18 14:03:51 -07:00
Paulo Matos
3bf323aa2b
Clear IE flag on fninit
2025-08-18 15:40:46 +02:00
Ryan Houdek
26b4195f1f
Merge pull request #4779 from asLody/environ
...
Windows: Support EnvLoader via _environ
2025-08-14 11:22:23 -07:00
Lody
cd31a79f41
Windows: Support EnvLoader via _environ
2025-08-14 10:41:11 +08:00
LC
c8810557c1
Merge pull request #4777 from Sonicadvance1/move_gdt_up
...
FEXCore: Split GDT and LDT prep work
2025-08-13 12:06:41 -04:00
Ryan Houdek
3f9df49e3e
FEXCore: Split GDT and LDT prep work
...
Taking this very slowly because this is very fickle code. The frontend
needs to manage GDT and LDT, but before we get there, we need to
actually add support for LDT in the backend. Split the segments to two
arrays so the JIT can actually update their cached values correctly.
Still treats GDT and LDT as mirrors like how the JIT previously did (By
it ignoring the selector's TI bit).
2025-08-11 20:45:51 -07:00
Billy Laws
1ac3d3c5a6
Windows: Extend user handle access masks in callbacks where necessary
...
While most applications will just create ALL_ACCESS handles which
support the additional operations FEX needs over the regular windows syscall
(usually just QUERY_INFORMATION to lookup the thread object), it is
valid for them to pass in the minimal set required for each operation
and windows/wine will reject any other operations (e.g. querying the TEB
base on a handle with only the SUSPEND right). Windows permits
duplicating handles to extend their permissions given the process itself
has such permissions, so do that as necessary for the operations FEX
needs.
2025-08-12 03:19:20 +01:00
Billy Laws
b2b5ccf69c
Windows: Validate any user handle permissions for syscall callbacks
...
In the terminate case, if we don't return early then we will delete the
FEX thread object but the actual terminate call that follows will
fail, leaving the thread in a bad state.
2025-08-12 00:51:00 +01:00
Billy Laws
6f5d4fbf30
Windows: Avoid potential deadlocks is a thread is terminated while in the JIT
...
Try to suspend the thread before termination to ensure no important JIT locks
are held that could be left locked if the thread is compiling code etc.
2025-08-12 00:51:00 +01:00
Billy Laws
8ad1ea499d
Windows: Avoid a double-free if a thread is terminated twice
...
Unlikely to show up in any real code, but if an attempt is made to terminate
a terminated thread we should handle this gracefully.
2025-08-12 00:51:00 +01:00
Billy Laws
4df17abea7
Windows: Avoid potential race between thread init and termination
...
With the prior locking, we could try to terminate a thread while it
was initializing and perhaps holding global locks leading to deadlock.
2025-08-12 00:51:00 +01:00
Billy Laws
972c8a97dc
ARM64EC: Disable syscall callbacks when handling OvercommitTracker AVs
...
We don't need to be informed of our own mappings, avoids a deadlock that
occurs if the ThreadCreationMutex lifetime is extended when creating a
thread.
2025-08-12 00:50:51 +01:00
Billy Laws
dd2845401c
InvalidationTracker: Disable mono hacks when multiblock is disabled
2025-08-07 21:27:04 +01:00
Billy Laws
52af0aceea
Windows: Ignore MEM_RESET(_UNDO) allocation protection notifications
...
When these are set the allocation permissions aren't actually updated.
2025-08-07 02:05:35 +01:00
Billy Laws
cd1cf6f615
ARM64EC: Drop redundant ThreadCreationMutex locks
2025-08-07 02:04:48 +01:00
Billy Laws
fddc86c2b1
Windows: Opportunistically detect and replace the mono backpatcher
2025-08-06 22:39:17 +01:00
Billy Laws
0dddc9b5cb
InvalidationTrack: Support disabling SMC detection
2025-08-06 22:39:17 +01:00
Billy Laws
8d1d3fe12b
Windows: Implement SyscallHandler code range invalidation
2025-08-06 22:39:17 +01:00
Billy Laws
37ac46273d
Windows: Print extra debug info on image map
2025-08-06 22:39:17 +01:00
Ryan Houdek
369ca5cb72
Merge pull request #4719 from Sonicadvance1/runtime_mode_switch_take2
...
Runtime mode switch take 2
2025-07-30 11:47:54 -07:00
Tony Wasserka
f7e99678b4
Merge pull request #4730 from Sonicadvance1/fix_thunk_functional_path
...
unittests: Fixes thunk unittest path
2025-07-30 10:20:46 +02:00
Ryan Houdek
2a8f4dbbb6
Arm64EC: Update for GDT
2025-07-29 12:02:38 -07:00