A fast usermode x86 and x86-64 emulator for Arm64 Linux
MIT License
Bot releases are hidden (Show)
Published by Sonicadvance1 about 2 years ago
Some really exciting changes this month. Thunk stabilization out of the gate is a huge boon to tinkerers and a bunch of other things spread
throughout!
The amount of work to reach this point can't be understated. @neobrain has been putting forth a bunch of infrastructure
work over the past few months which hasn't been super visible to the end user. This month it culminated towards fixing a bunch of stability problems
with thunks.
One of the biggest problems ends up being when a pointer is passed between the guest and host through thunks. X11's XFree function is used for both
x86 specific pointers and AArch64 pointers. This ends up being a problem since FEX-Emu uses jemalloc for its allocator while a guest application is
highly likely to use glibc's allocator. Passing the opposite one to either will crash either. We now distinquish between a "Guest" pointer and a
"Host" pointer in our thunk of XFree, which significantly improves stability of X11 thunks.
We also now have our libGL thunk implicitly load libX11. Due to how FEX's thunks work, we don't pull in all of the library dependencies of a "real"
library like libGL. Long term FEX-Emu will likely want to link to the same libraries that the real x86-64 library would have linked to. For now, libGL
now relies on libX11 directly. This fixes an issue where libGL thunks wouldn't work at all for any game launched from Steam.
Then the big pull request that does an absolute wackload of infrastructure work to make things work, Implement signature-based thunking of function pointers. This pull request is a bit complex to explain but it allows function pointers to be marshalled
across the thunk architecture boundary safely. Allowing both x86-64 and AArch64 to call in to the other for code for whatever reason is necessary. I
would recommend reading the pull request itself because the information is quite dense there.
Then some very minor changes the fixes some edge case behaviour.
The take away for this effort is that OpenGL thunking is now significantly more stable. We don't have a lot of games tested yet, but follow along at
our wiki for documenting which games support thunks under FEX-Emu.
When OpenGL or Vulkan thunks are enabled, games are dramatically sped up. It is the recommended way to play a game but we need more testing coverage
to ensure it is stable enough to use.
x86 has six instructions that explicitly fault in different ways. We weren't handling RIP setting correctly on some of these.
This was uncovered by running Elden Ring inside of FEX. With this bug fixed FEX-Emu can now run the game if Denuvo is disabled by renaming the
executables. Sadly it doesn't seem like Snapdragon can run this game yet.
@Lioncache has been working away at making this feature a reality. Newer games coming out are starting to require AVX
to run and FEX needs to support this. This is a necessary feature since we need to claim compatibility for any CPU feature that
games use. So far the list of games we found is few that require the feature but it is going to become more common. The latest generation of game
consoles will drive this feature over the next decade of releases.
This sets up the initial groundwork inside of FEX-Emu to support the feature, with instruction implementations coming in the next months.
Don't expect this to run on any of your ARM devices any time soon though. We are going to require SVE with 256-bit register width to expose it. All
current hardware either doesn't support SVE at all, or only supports a 128-bit register width. Look forward to future hardware that ships with this
feature.
This is cleaning up some of the rough edges inside of FEXConfig, making it easier to modify your config. Significantly less keypresses to open a
config! Perfect!
Due to how FEX changed some of its threading logic, we broke SOMA abusing the SETXID signal. This is now resolved and the game runs under FEX-Emu
again.
Applications relying on signals would very likely have crashed for a while due to this regression. With this resolve these games are stable again.
FEXRootFSFetcher now has command line options for automatically choosing distro image and setting it up in config. This is useful for containers
embedding FEX and wanting a fresh rootfs instead of shipping it. It also does a runtime check for any image tooling programs before executing, fixing
a spurious error message.
Proton would sometimes hang due to a close_range syscall trying to close all file descriptors. Make FEX a bit smarter about closing FDs with this
syscall which fixed the bug.
When running FEXBash it can be confusing for new users how it is behaving. Now we show the current operating path, user, and FEXBash as a prefix.
Hopefully this can be less confusing to new users that FEXBash isn't a VM, or docker style chroot.
Not much changed from FEX's perspective here. Some minor DRM changes that naturally work themselves out.
Sorry about filling up your /tmp folder with empty files. This has been resolved.
Thanks to @wannacu for this fix. Our testing of older Linux distributions is quite spotty since FEX-Emu only officially
supports back to glibc 2.31 distros. This adds a wrapper utility for this syscall so older versions of Linux can compile FEX. Your mileage may vary
since FEX-Emu doesn't officially support it although.
Static pie will never work due to glibc limitations around dlopen that FEX needs for thunks. Remove the option entirely to ensure no one tries to use
it.
Newest release is best release
We were setting up both 32-bit and 64-bit syscall handlers upon initialization. Now we only initialize one or the other. Saves a bit of memory and
startup time shaves some microseconds off.
It's no longer required as a install dependency on the host. We need to handle all Vulkan signatures, not just what is available on the host.
Makes compiling Vulkan thunks slightly less painful.
AppConfig
Fix bug with filename (https://github.com/FEX-Emu/FEX/commit/ac23bce0baf9850d1a2faa54589a1da2cfb04adb)
Arm64
JIT
Remove unnecessary [[maybe_unused]] attributes (https://github.com/FEX-Emu/FEX/commit/89aa59061589be21374556ba6716b8e60439d0c8)
Arm64Dispatcher
Amend memcpy in SpillSRA (https://github.com/FEX-Emu/FEX/commit/f5e18ccea6d83f9d457273b7f47663b73981aadd)
Arm64Emitter
Re-add use of stp/ldp with hosts that don't support SVE2 (https://github.com/FEX-Emu/FEX/commit/85891197252f3e28f60985723a542eb2b90c88fe)
CMake
Support multiple json files in the root of Data/ (https://github.com/FEX-Emu/FEX/commit/bd296d7a11df2143bff0e9d50152aad1d41b1138)
CPUID
Detect Cortex-X1C (https://github.com/FEX-Emu/FEX/commit/c9f0ecb1e8339a157e65844d66344379558d8c30)
Config
Support a global configuration file (https://github.com/FEX-Emu/FEX/commit/3a64ea1650c701af6f3da1fa781db660e50b7e99)
Dispatcher
Fix SRA enabled check in signal delegator handlers (https://github.com/FEX-Emu/FEX/commit/0dfe617d964bdd4114f4ed62b4a3d0fab392da0a)
Externals
Update fmt to 9.0.0 (https://github.com/FEX-Emu/FEX/commit/54f62b67016d875e55985b9516bca7c94a40d380)
FEXBash
Changes PS1 to hopefully help users (https://github.com/FEX-Emu/FEX/commit/a72ebfdec05f03bf397fe72dc394272c8e188a27)
FEXConfig
Some quality of life improvements (https://github.com/FEX-Emu/FEX/commit/164299ce25079c96ee3f6c06504f185e5ac9a192)
FEXCore
Fix-up edge case behaviour on faulting instructions (https://github.com/FEX-Emu/FEX/commit/8037231376b28d9f84ac23095ea2cbedb9ec38a5)
Adds assume optimizing LogManager function (https://github.com/FEX-Emu/FEX/commit/3d347ed565d45a272af3fd5a890db7a278814042)
Support synchronizing RIP on block entry through config (https://github.com/FEX-Emu/FEX/commit/80909eaa84916c04254435dbf3f718f2cc7ff64d)
FEXRootFSFetcher
Adds runtime checks for image mounting tools (https://github.com/FEX-Emu/FEX/commit/cfd59db9989cf8f843ad62aa57c6000c28ea1b78)
Actually wire up -a -x (https://github.com/FEX-Emu/FEX/commit/3aabe077200dcde04745bc70fbf0fd9161e568b5)
Add some options for automation without user intervention (https://github.com/FEX-Emu/FEX/commit/f6fcfbabd51101c51368c8dba6a8ccf4af547eea)
FEXServer
Fix unsafe vector insert/removal (https://github.com/FEX-Emu/FEX/commit/0982ec617dcae49bf5bdf7887f927121bab4fb28)
HarnessHelpers
Handle SSE register offsets in CompareStates (https://github.com/FEX-Emu/FEX/commit/0e93ba532f66b2ce615bfe332688a0ac6d8d2064)
Interpreter
Move argument names over to IR names (https://github.com/FEX-Emu/FEX/commit/3f9a1c3751fca7b84dd5efc81261a1401b2411fb)
JitSymbols
Only initialize perf map file if using (https://github.com/FEX-Emu/FEX/commit/a984674dae87f8c0574d513d02af45a38657d011)
Linux
Fixes hang in close_range (https://github.com/FEX-Emu/FEX/commit/4dfe0a059545a549f7b168a4ac1ffd20c61aa626)
Only install syscall handlers for the arch we launched with (https://github.com/FEX-Emu/FEX/commit/018661609aa6f77f4e2d324a631504753018a229)
Syscalls
Removes staging vector usage (https://github.com/FEX-Emu/FEX/commit/6903159f30a0775faf34582fac853611d51415c7)
Telemetry
Support executable names through wineserver (https://github.com/FEX-Emu/FEX/commit/ce0c24eee9d474ab2626c51a929e02ca8f269f51)
Thunks
Extends libGL interface to support more functions (https://github.com/FEX-Emu/FEX/commit/1051cd97cf3a32f1c57bec8f31d68bfdc1429319)
Make glXGetProcAddress self-query work (https://github.com/FEX-Emu/FEX/commit/dd7e1baa789cb051ecc5033007701c6b614a44da)
Make unknown glXGetProcAddress non-fatal (https://github.com/FEX-Emu/FEX/commit/ab228c1fcbbaf28d0a23c8948cd7b9d9d80a4507)
Use external Vulkan-Headers (https://github.com/FEX-Emu/FEX/commit/9664d98ba5b581ee6e8f7da92a3e0fabe9cb9197)
Make GL guest thunks implicitly load libX11.so (https://github.com/FEX-Emu/FEX/commit/5eab087cc2b693cc7f9fd837b6004f653bf6333c)
X11
Distinguish between host and guest pointers in XFree (https://github.com/FEX-Emu/FEX/commit/6933c2aaffe77b62303c2a5e8abf267d08effba2)
Misc
Disable UnitTestGenerator (https://github.com/FEX-Emu/FEX/commit/45330fdd5da66fb4e7c387f91584ff6388ec5ea0)
Synchronized Block Linking (https://github.com/FEX-Emu/FEX/commit/b9c9c7d671c5e428630c30a49412bc258ccd859d)
Implement signature-based thunking of function pointers (https://github.com/FEX-Emu/FEX/commit/62d9961bd139808cc959333ca6ba8f52f772e455)
Cleanup syscalls headers (https://github.com/FEX-Emu/FEX/commit/c3c52d01d3b58721327a8a4eb598863ecf971786)
json_ir_generator: Remove Args() functions from IR structs (https://github.com/FEX-Emu/FEX/commit/98d935d9723018cfc1fb5a0724c43cefe834c82a)
Fix SOMA and sigaction definition (https://github.com/FEX-Emu/FEX/commit/b07660c4fa33ed77e141c8f9620999b458e76b4d)
improve compile ability for older linux (https://github.com/FEX-Emu/FEX/commit/c1688fa392e76e4926a8d7fda5c24ba34992c2f6)
AVX initial groundwork (https://github.com/FEX-Emu/FEX/commit/c17340547c420ff05d49c4cb965549d3d60e0467)
x86_64: Migrate args over to named IR arguments (https://github.com/FEX-Emu/FEX/commit/3ac6ba0fe22682d7ada937ba2ca604e3851bff23)
cmake
Remove the static-pie compilation option (https://github.com/FEX-Emu/FEX/commit/a112db169c2048592849e5d1a44de4611557c9f6)
drm
Update to v5.19 (https://github.com/FEX-Emu/FEX/commit/1fa6bf1cc8b92e2e31dc9426a1830396a3dfe118)
unittests
Adds 32-bit into test (https://github.com/FEX-Emu/FEX/commit/f2602e3136dad9e82264714d2d86366073b2b4ee)
vixl
Update (https://github.com/FEX-Emu/FEX/commit/9b685ba824bce073f614a2ceeed853d2f15aa960)
Published by Sonicadvance1 over 2 years ago
This is going to be a very interesting release this month for users. Quite a large number of features landed for this release!
When FEX is running a single threaded application, we can be optimistic and disable heavy TSO-emulation related features. This significantly speeds up some single threaded applications. Once the program creates a thread then FEX will disable this optimize and clear its code cache to be safe.
While FEX has supports SquashFS for a long time. We are now adding support for EroFS as well. The big advantage of EroFS is that it doesn't serialize accesses to a single thread. When you're having dozens of threads accessing the filesystem this is a real bottleneck. Low end devices would end up having a single CPU core maxed out inside of the squashfuse application while multiple threads are trying to request data.
erofsfuse solves this by allowing multi-threaded decompression that scales quite well depending on the number of file requests in flight. We can see how this scales in the following benchmark graphs.
As one can see, while erofsfuse scales quite well with multiple threads; squashfuse stays pretty much flat the entire time. The downsides to EroFS is that the compression ratio of its LZ4HC compression isn't quite as good as ZSTD, causing the rootfs to be larger. But the reduction in memory usage, and lower read amplification plus higher bandwidth is worth it. Seriously improving performance of using a rootfs over a network mapped share like some people do.
An additional problem is that the erofsfuse application requires erofs-utils version 1.5, which came out on 2022-06-13. This is really bleeding edge currently.
Never the less, FEXRootFSFetcher will now allow you to download a FEX Rootfs image with this compression format. Just ensure you have a erofsfuse installed.
This is a fairly significant change to how FEX-Emu operates in the background. Similar to how wine has a wineserver, FEX is now requiring a FEXServer
to always be running.
For now the FEXServer is taking over duty for rootfs image mounting and a logging server. In this future this will be expanded to also handle code
caching services and more. FEXServer will automatically start on invocation of FEX and be running in the background until all instances of FEX close.
FEX-Emu now officially works inside of pressure-vessel. This is the tool that Steam uses for running Proton games. Thunking doesn't yet work in this case but it is coming.
If you're wanting to test proton games, make sure to sign up to the latest SteamLinuxRuntime_soldier beta in the settings and give it a go. It's not currently the speediest, but it should work.
Pressure-vessel sets up an x86-64 rootfs. FEX shouldn't be using the FEXServer provided rootfs in this case.
We now detect when running inside of pressure-vessel, and disable the FEXServer RootFS
This change allows pressure-vessel to detect FEX-Emu and do FEX specific setup for games.
The open syscall is fairly rarely used so this has gone unnoticed for a while. We weren't wrapping this syscall in our filesystem emulation and was breaking applications from running. With this fixed, the latest Proton Experimental branch from Steam now works!
Pressure-vessel uses a bunch of environment variable overriding to replace where libraries are inside of its chroot. Support this inside of FEX. While this is a step to getting Thunks working inside of pressure vessel, it is not yet supported.
Lots of improvements to thunks, it's hard to capture them all. There is a heavy amount of infrastructure work going on in here to make thunks more robust and stable. Starting with Vulkan and GL.
In an edge case of how FEX-Emu handles clone3, it wasn't handling the stack pointer size correctly again.
Resolving this edge case once again gets Steam's web helper working with glibc 2.34.
When scanning for free chunks of memory in the 32-bit range, FEX-Emu needs to use a custom allocator to ensure everything returned ends up in the lower 32-bit memory space. This fixes a bug where large allocations would never find an empty space. Fixes X-Plane 11!
It is a common occurrence that FEX needs to map an open file descriptor back to a file path. This used to take 14 system calls.
Since each system call was querying filesystem metadata these could take some time. With this optimized approach it now takes only one system call instead. Significantly lowering file IO overhead!
Wine applications when they are executing typically only showed up as wine or wine-preloader to FEX-Emu.
Now we work around this issue by scanning the arguments to find the executable name, which allows application profiles to function.
Now we can easily support SonicMania.exe.json!
It was discovered that this tool was hashing files incorrectly. The new version is now hashing correctly and image files have been updated to be using the new hash. Nothing to see here
This ioctl does exactly what it says on the tin. Due to a copy and paste error, this wasn't actually waiting on vblank.
A feature of the DRM subsystem allows you to extend ioctl struct definitions safely. The kernel knows the size of the ioctl structure and if it
differs from what the userspace application passes in, then it will only copy the smaller amount of data and zero out the rest.
This allows older userspaces to safely work with newer kernels. FEX wasn't reproducing this with its ioctl emulation in some V3D ioctls, resulting in unsafe execution of ioctls. This has been resolved.
This instruction is heavily used to accelerate CRC and other hashing algorithms. This perfectly matches the AArch64 instruction as well. So
implementing this was very straightforward!
Allows FEX to track code pages inside our frontend decoding. This fixes some issues where code can be changed while we are decoding things in the frontend. Now FEX can detect this and throw away what it compiled.
To ensure building from source doesn't result in a broken configuration, cmake will now check for conflicting binfmt_misc files before installing.
How to uninstall the conflicting binfmt_misc files is specific to how the user has installed them, so it is left up to them to find out how.
If the CI systems need an updated rootfs, the config can now be updated and they will fetch the latest.
ASM unittests would always reglob on building which took time. This is now fixed
This was hard to track, finally this annoying bug that has gone back and forth a bit has been resolved!
Automatically disables some incompatible unit tests on ARM64 devices that don't support some features. No more confusing failures.
This allows a plugin to be loaded in GDB to show more information that we would otherwise have. Giving us both backtraces and source inside of GDB
even through the JIT. Should let debugging the JIT be that much easier.
AOTIR
Fix IRList delete (https://github.com/FEX-Emu/FEX/commit/fb41ba172d5efdc2f2b46714c828ad4af6291dde)
Fix RAData free (https://github.com/FEX-Emu/FEX/commit/9242e59841359b139caafbb0d8c7e928a05f4192)
Arm64
EncryptionOps
Fix register specifiers in PCLMUL movs (https://github.com/FEX-Emu/FEX/commit/63b70ff3d44d394febc34ba80a6ac8ca3edb0225)
JIT
Use IR names in opcode implementations (https://github.com/FEX-Emu/FEX/commit/19b0a9cd7defc0b943e6e462a4b4ebcea60ecb67)
Backends
Unified dispatch, interface rework, cleanups (https://github.com/FEX-Emu/FEX/commit/072690a191e7d56f1d7edefbccefee4f5cffd81f)
CI
Auto rootfs fetching (https://github.com/FEX-Emu/FEX/commit/c027acecf8b3412b42a5df29753ea2b71a1ccffb)
CMAKE
Create directories during configuration, fixes endless generation of unittests (https://github.com/FEX-Emu/FEX/commit/e62bc24b3f96aa077978b87796f0635e21c76515)
CMake
Check for binfmt_misc conflicts before install (https://github.com/FEX-Emu/FEX/commit/6d2f98a379aee444e4d9b30e7b919e0afd950436)
CPUID
Enable the hypervisor bit (https://github.com/FEX-Emu/FEX/commit/da8dbf177714ce474fb225dbdb7125e2c6d0b023)
Common
Support application profiles for games launched through wine (https://github.com/FEX-Emu/FEX/commit/3913dd6c8b18ff2796ed4acecc7c1b589300bfd5)
Config
Fixes AppConfig for wine-preloader (https://github.com/FEX-Emu/FEX/commit/ae6a57e6677a7662748297df040355b3e3915c18)
Context
Fix CreateThread partial initialization issue (https://github.com/FEX-Emu/FEX/commit/eac579f714d4c623f511b770597f9feed40516da)
Decouple from CodeLoader, introduce generic CustomIREntrypoints (https://github.com/FEX-Emu/FEX/commit/b0a31f7105744e6902094d7f8b42f0d9fc055f1f)
CoreState
Add register size constants (https://github.com/FEX-Emu/FEX/commit/1c1ad876cab8eb7dbecbac191b035eb1680a1a61)
Dispatcher
Arm64
Fix vixl assert (https://github.com/FEX-Emu/FEX/commit/0f696c609287331608d9a2d94e99b4d0475d17b6)
Dispatchers
Use thread local emitters for backend callbacks (https://github.com/FEX-Emu/FEX/commit/4f9bc705629e57ad17b3072e5d03ce201fbf4c2b)
FDUtils
Fix get_fdpath (https://github.com/FEX-Emu/FEX/commit/aa17f6459361b1d8b2551874906c994d3b7f6d9a)
FEXGDBReader
Fix install path (https://github.com/FEX-Emu/FEX/commit/b3e090c8ff94930c7440b37c623548080cc3e0d2)
FEXRootFSFetcher
Update and fix xxhash file hashing (https://github.com/FEX-Emu/FEX/commit/c0a8984799def7ea666d32b7d11500c923c7e4b5)
FEXServer
Stop leaking FDs to subprocesses (https://github.com/FEX-Emu/FEX/commit/b7806e47e9cba4a063d6962794d151ffde17e481)
Minor changes (https://github.com/FEX-Emu/FEX/commit/1f1d0706dd85ed2ef50251e5029e516b3d72003d)
Adds -w option for waiting on current FEXServer (https://github.com/FEX-Emu/FEX/commit/b020e593a5b34d8add4e86850f8bfeb155dc5223)
Adds new FEXServer service (https://github.com/FEX-Emu/FEX/commit/5a19425b2830dd79be3bbaab6a1fd7b7540d9e2a)
FEXServerClient
When running under pressure-vessel don't use FEXServer rootfs (https://github.com/FEX-Emu/FEX/commit/9110546d34ea41716e8d2441530590922f8b0f03)
IPR
Store copy of IRLists, Dispatcher cleanups (https://github.com/FEX-Emu/FEX/commit/790bd9747f9ed3aaa264a2b16a38de3b06dd34d1)
IR
Remove GuestCallDirect, GuestCallIndirect (https://github.com/FEX-Emu/FEX/commit/e4d659a619f651101c1305ed18b4c78485b7ca51)
add IsFragmentExit, IsBlockExit (https://github.com/FEX-Emu/FEX/commit/2d3c6efae235a4ee74361ba6df299159175c83ca)
Invalidations
Move invalidation locks to Context (https://github.com/FEX-Emu/FEX/commit/ffcde1823bfece9b6f07fa39411fe6874dcd4665)
Ioctl
Safely access v3d csd ioctl structure (https://github.com/FEX-Emu/FEX/commit/158ba1ae3bc6e307784fa1b7f599c391557218f4)
Ioctl32
Fix DRM_IOCTL_WAIT_VBLANK (https://github.com/FEX-Emu/FEX/commit/982518d3a48c5a92c1faa1d390fdffdc7af3cd8b)
JITs
Qualify external includes consistently (https://github.com/FEX-Emu/FEX/commit/b05e5ce14e13001910c86c8a18ea626a69e353b7)
Linux
Fixes for clone3 stack size (https://github.com/FEX-Emu/FEX/commit/1494aac861b6c60f2e87cfac6a89ff2062ff24f5)
Make get_fdpath
more optimal (https://github.com/FEX-Emu/FEX/commit/542ab04671278c6ce8c4ca615f071c7c3693b907)
Fixes 32-bit allocator range scanning (https://github.com/FEX-Emu/FEX/commit/4c73c715ad857e55413373c1df26dea4e40a1eca)
Fixes open
syscall emulated path handling (https://github.com/FEX-Emu/FEX/commit/43234939ca08ae8e0383bdaf71fd385c3f721510)
OpcodeDispatcher
Handle CLMUL opcode extension (https://github.com/FEX-Emu/FEX/commit/9e9ceb389407f9cb505d31441dc82110e51db242)
SMC
Track code pages before frontend decode (https://github.com/FEX-Emu/FEX/commit/bbd9eb5b9a70804530c9878d52d1b99106c085e5)
Scripts
Allow user override on tagged version (https://github.com/FEX-Emu/FEX/commit/aafe7ff10fb27133c0116a1fe6a37628c4a6cc04)
TSO
Add auto migration optimisation for applications that don't need TSO (https://github.com/FEX-Emu/FEX/commit/c99d1e48bd1a4c57c122ff848088be326a8bb3e2)
Tests
IRLoader
Silence missing override warning (https://github.com/FEX-Emu/FEX/commit/ade3a5275d278458c62863d0dfc7ff04ff1efbb5)
ThunkLibs
Fix Guest.h (https://github.com/FEX-Emu/FEX/commit/302a6c96ffbb2718a8f2c424705b890ecca075af)
silence warnings (https://github.com/FEX-Emu/FEX/commit/30a28ff1adec59c0dd769b6f0b0354286c22ff90)
vulkan
Work around lack of generic callback support in VK_EXT_debug_report (https://github.com/FEX-Emu/FEX/commit/4771a340f5dd1a0674d206aa823fa51feaf2e764)
Thunks
Implement generic callback support (https://github.com/FEX-Emu/FEX/commit/aec5b21d2a571654202ffdf94f8d055e506fc7ea)
Soften error condition to be non-fatal (https://github.com/FEX-Emu/FEX/commit/3b8491b558df915d5250c094ebac0cf95390f226)
Adds libvulkan steam pinned library thunking support (https://github.com/FEX-Emu/FEX/commit/6b226dd6af70375975325cc946702f1d10793dac)
Fix std::set crash (https://github.com/FEX-Emu/FEX/commit/6a43db8c8fef5e36d07ae300468d4f3b36c7f678)
Add fex:is_lib_loaded (https://github.com/FEX-Emu/FEX/commit/88b94bef54a6b49805284710a5c33c1c516ad4cb)
Support returning host function pointers to the guest (https://github.com/FEX-Emu/FEX/commit/04a1ac967c9499070bf4e04686a1de1af76658bb)
Support pressure-vessel prefixes (https://github.com/FEX-Emu/FEX/commit/e2e6f2a92bec8cb1370c0424a2135a752ecbc8ff)
vulkan
Disable debug report callback (https://github.com/FEX-Emu/FEX/commit/751b66d45d9eb19093c10acf7fa67db1a9a02cd2)
ThunksDB
Fix String.find error check (https://github.com/FEX-Emu/FEX/commit/d8fa53a445aba3684151eae90c2972701391bab5)
ValueDominanceValidation
Avoid stack exhaustion when aggregating predecessors (https://github.com/FEX-Emu/FEX/commit/124097d563d360554666d9dbcf5d8da71876d125)
Vulkan
Handle queries for unknown functions more gracefully (https://github.com/FEX-Emu/FEX/commit/e137c2edffe428d8180602682f26877526215724)
Misc
Support EroFS (https://github.com/FEX-Emu/FEX/commit/46fcbe2fc0631ec73cb4fdeccb602e833d12a7ba)
Allow building thunks on a wider range of platforms (https://github.com/FEX-Emu/FEX/commit/ad6fd5ab7211498b5cba566edeab26b9f3b6e625)
Fix inconsistent allocation schemes used for RegisterAllocationData (https://github.com/FEX-Emu/FEX/commit/8a21ecabee9495546e8d9c7599dc52cbd092ab74)
Make Dispatcher per Context from per Thread, Simplify TestHarnessRunner (https://github.com/FEX-Emu/FEX/commit/0a62a4c5719af31cf30f0be952630c7ca01a77f9)
IR.json: Correct 'Dest' key to 'Desc' (https://github.com/FEX-Emu/FEX/commit/51c5f945b4243dcd231891e9185012128f72c27c)
gdb
jit integration (https://github.com/FEX-Emu/FEX/commit/4449b604597a6b23699a9cf18ec75761b053e078)
unittests
Classify CPU based on CPU features (https://github.com/FEX-Emu/FEX/commit/d005fdcd03740f2fb025d7bd085a0f92e432461e)
Disable known flake in posix tests (https://github.com/FEX-Emu/FEX/commit/a97fb2f34fca481b57421de40a0940ac295b39da)
Add FEXLinuxTests with a few tests (https://github.com/FEX-Emu/FEX/commit/cb0935c96b5872fb6f69ece379e66016e4acad1e)
ThunkLibs
Fix test failures due to missing FEX_PACKFN_LINKAGE define (https://github.com/FEX-Emu/FEX/commit/a2c9d5a398ebf179bbc4e9edd9ba3c2ec1778504)
Published by Sonicadvance1 over 2 years ago
Quite a large amount of changes this month since we cancelled last month's release.
Steam started enabling the chromium sandbox. Seccomp isn't supported in FEX-Emu so it was crashing early on.
Forcibly disable it trying to use the sandbox using an application profile.
This lets the game library be visible again, although it can take a while to appear.
There was a bug in our CMPXCHG implementation that wasn't using ARM's acquire-release semantics accidentally.
Fixing this bug allowed us to reenable our TSO emulation using LRCPC.
Additionally we have added support for LRCPC2 which gives us some immediate encoded instructions to further reduce overhead.
On hardware that supports LRCPC these can result in a reasonable performance uplift.
These SHA instruction have been implemented and the CPUID bit is now exposed.
This is a GPR based implementation, an implementation using AArch64's equivalent SHA instructions will be implemented at a later time.
Many things have changed with supporting self-modifying code in a more extensive fashion.
FEX-Emu will now tracking guest allocations of executable memory and when the code has been modified, we will clear the JIT caches.
This happens for both true self-modifying code and also libraries being loaded.
Fault handling is employed to know when code is modified in memory to ensure we can tracak changes.
This is a new setting in FEXConfig called mtrack. The older syscall only tracking path is deprecated but still available for testing.
Big shout out to CallumDev for implementing this long awaited feature.
A major performance problem of emulating x86 is any older game will be compiled to use the x87 extension. This is especially true for 32-bit games.
The problem with this extension is that by default it uses 80-bit floats, which AArch64 doesn't support.
We end up emulating this entire extension using a soft-float implementaiton, which while being quite accurate, is obscenely slow.
This performance hack is now available to remove a significant amount of the overhead by operating x87 instructions using 64-bit float scalar
operations instead.
This is known to be inaccurate, but most Windows games will actually be configuring the x87 unit to be lower precision than 80-bit.
Additionally most games don't actually need the extra precision that 80-bit provides, so it is usually safe to emulate it more inaccurately.
This may still have some bugs, we know at least one game that has issues that aren't explained by pure precision problems. The feature can be enabled
in FEXConfig under the Hacks tab, look for "X87 Reduced Precision"
With Glibc 2.34 released, this project has started using the clone3 syscall for creating threads.
FEX's implementation was mostly untested which resulted in all applications breaking.
Stack pointer behaviour was broken and now with this fixed, glibc 2.34 now works out of the box.
FEX-Emu's CDN doesn't support continuing file downloads. Disable to not cause issues.
FEXCore now uses an intrusive pooling allocator to allow sleeping threads to give back memory to the pool.
This allows multiple threads to share a memory resource, reducing memory usage by a significant amount if an application has a bunch of sleeping
threads.
Once running FEXBash it can be hard to tell if you're running your bash terminal under emulation.
Setting PS1 to FEXBash> makes it easier to tell that the terminal is running under emulation.
FEXBash> uname -a
Linux ryanh-TR2 5.17.5 #FEX-2206 SMP Jun 4 2022 15:11:07 x86_64 x86_64 x86_64 GNU/Linux
Newer Unreal engine releases were generating a PEXTRB instruction that our frontend decoder was decoding incorrectly.
Typically this would result in a crash.
This fixes both Dirt 4 and Psychonauts 2.
FEX Release FEX-2206
AOTIR
copy RAData and IRList, make sure data is accessible (https://github.com/FEX-Emu/FEX/commit/da2e44d0247b1a0209e71923cf10db8d6e8ffb70)
AppConfig
Inject --no-sandbox in to steamwebhelper (https://github.com/FEX-Emu/FEX/commit/c14c0c2e3b0e2ed5281686b6dbbc4ba010cb7424)
ArchHelpers
Adds relocation struct defines (https://github.com/FEX-Emu/FEX/commit/b5ae9e4c976fd2c542502e48c3e734c7bdd0e089)
Arm64
Fix LDAPUR/STLUR DMB backpatch (https://github.com/FEX-Emu/FEX/commit/27f2e0b06de7fab204265f1a6de8fca7b92b6d13)
Adds support for RCPC2 extension (https://github.com/FEX-Emu/FEX/commit/f8ba373e1839cf09c4082f3078c8463f259be68c)
Fixes AtomicSwap (https://github.com/FEX-Emu/FEX/commit/70988ccfee8057f84887ac5a1dfdf9a39d1cca29)
Arm64Emitter
Optimize constants with ADRP and ADR (https://github.com/FEX-Emu/FEX/commit/912dbfe5bd9890d4b5af3879cff0f4415e48cb07)
CMake
C/C++ flags for defined singed overflow warping (https://github.com/FEX-Emu/FEX/commit/2e0534924afac2f79ac2ebe3820bf8c4c4915ee9)
Add option to use the mold linker (https://github.com/FEX-Emu/FEX/commit/58841142ee39e483eb7899ec8f4c1c2f76ea6ca3)
CompileService
Removes no longer necessary service thread (https://github.com/FEX-Emu/FEX/commit/b1033ed7c65bbb48a218241d5de6ed4491e789fd)
Config
Adds code cache config option (https://github.com/FEX-Emu/FEX/commit/278ca52d972ca0957175ab569e2f4d5edd50ab85)
Core
Adds Code Object Cache service (https://github.com/FEX-Emu/FEX/commit/13f3c6e75a5328284f65ba8b1a3379977e1cfcb5)
context-wide guest code invalidations (https://github.com/FEX-Emu/FEX/commit/d8109880f4a2979907a705caaae7c0534417213a)
EmulatedFiles
Fixes temporary file flags (https://github.com/FEX-Emu/FEX/commit/4fbc266b18f62d1a9774ea17e399ac8257221003)
F64
Implement FCW using host rounding mode (https://github.com/FEX-Emu/FEX/commit/db3854e3913080cd23e7a563b46cca762c23c868)
Fix FILD and FIST for Size < 8 (https://github.com/FEX-Emu/FEX/commit/89d6752d3d2b8b5958a6cad30359b6e6dbd04119)
FEXBash
Set PS1 to make it more obvious when running under FEX (https://github.com/FEX-Emu/FEX/commit/ec38d58b370fba8d0a3974321023dffe8c4bc6fc)
FEXCore
Adds refcount_shared_mutex class (https://github.com/FEX-Emu/FEX/commit/1e597bfbeda42f4abe862e03e3369f74c2b5c1c8)
Reclaimable thread pool allocator (https://github.com/FEX-Emu/FEX/commit/8a7f39559c5c14232242e96891a4990da2e557bc)
FEXLoader
Fix create_directories check for aotir .path file writting (https://github.com/FEX-Emu/FEX/commit/90f338d7dbe9f70237acf7cbdceba56a6d06c2cc)
FEXLogServer
Stop improper use of std::erase_if (https://github.com/FEX-Emu/FEX/commit/d523b7a6c7395a149e2718161f3d2b755dd58d94)
FEXRootFSFetcher
Don't continue download (https://github.com/FEX-Emu/FEX/commit/fa87c73b9ee60a334eace2cdc3097725cbaf5b88)
JitSymbols
Print file+offset if possible (https://github.com/FEX-Emu/FEX/commit/a7156276e9a5cdb4428ea285858cf34c1b7e7d47)
Linux
Fixes 32-bit mmap (https://github.com/FEX-Emu/FEX/commit/3fd136b0da56c6e5d79cc110d8ea244e8b9d35f4)
MemAllocator32Bit
Add missing lock to shmdt, fix error returns (https://github.com/FEX-Emu/FEX/commit/b2b4c2bdcf596ca10a0df46911f7a56f7f5f8492)
OpcodeDispatcher
Implement SHA256 instructions (https://github.com/FEX-Emu/FEX/commit/3bbff8a948b4d96f66eab697bd7c61f70342a00e)
Handle SHA-1 instructions (https://github.com/FEX-Emu/FEX/commit/8dd9a5bd386308ff95df20d0373930b6b51d7860)
Implements support for PAUSE (https://github.com/FEX-Emu/FEX/commit/da480208821f28e566ae0cf6d598a0143d6f0f4c)
Fixes pextrb with high registers (https://github.com/FEX-Emu/FEX/commit/fe11bd2242de10fbc5ee067ff9e1523df265bea0)
Remove debugging dump statement (https://github.com/FEX-Emu/FEX/commit/c8dc663b0b72909ee21cc96c66ba88a9b9c2ea0d)
Adds support for non-temporal loadstores (https://github.com/FEX-Emu/FEX/commit/ba78dff1f81e04a295dd01ccba631b297ce6e5fa)
ScopedSignalMask
Add shared mutex support, move constructors (https://github.com/FEX-Emu/FEX/commit/8e36f5331fbdf58e48ac03771bbd94b08d62477b)
Syscalls
Fixes clone3 stack pointer (https://github.com/FEX-Emu/FEX/commit/0ed96544e1f8d7ce96fde6746b4f3d23c5e54895)
Linux
Add guest[Mmap/Munmap] (https://github.com/FEX-Emu/FEX/commit/b9d878b1f4f916718bda0bc722efbd246c31abe4)
Refactor guest mman tracking (https://github.com/FEX-Emu/FEX/commit/ce0f5db6f72a13df820910c8fe6c0ebbc9b56c73)
TestHarnessRunner
Use guest mapper for test harness files (https://github.com/FEX-Emu/FEX/commit/b78af2fdaf034f01edec6cf75f33b11d884f6531)
X86Tables
Leave shouldn't end block (https://github.com/FEX-Emu/FEX/commit/4f4263263b560b0a25e0d48555d5b99ca12c938f)
Misc
Struct verifier fixes and reenable (https://github.com/FEX-Emu/FEX/commit/c6153d6a527da5f98a3c32d0c19f88f2ed52ea82)
v5.18 support (https://github.com/FEX-Emu/FEX/commit/969d8f866cb649d37a0b8bc7ec3448b23403438b)
Fix dangling curl hyphen (https://github.com/FEX-Emu/FEX/commit/1dee54a9d892e59afab429947a6f79fb807256d7)
SMC detection via segfaults (https://github.com/FEX-Emu/FEX/commit/5460a24ea9c33b7ccdac70621c5975029a2a3d97)
Standarized TODO markers: FEX_TODO, FEX_TODO_ISSUE (https://github.com/FEX-Emu/FEX/commit/73d43c1d5573a4ea78e2109d9efa6f4978e6c086)
Clean up and document ScopedSignalMask (https://github.com/FEX-Emu/FEX/commit/5379f0a9c74758d578d6da742758b61ca0544888)
Object cache named region no-op implementation (https://github.com/FEX-Emu/FEX/commit/ee2d417d21249eb168d1e61a2659369756794038)
JIT relocation handling support (https://github.com/FEX-Emu/FEX/commit/c5dacab2ee7913318d5c218c2d10d1d6762d4bc8)
32-bit FSGS instruction fixes. (https://github.com/FEX-Emu/FEX/commit/9bc631a4276101e06a98c319a2556e9c1b32342c)
V5.17 support (https://github.com/FEX-Emu/FEX/commit/2f7dcb8d9382bf75469a82d75513691dfd5d958d)
Emulate reduced-precision X87 with 64-bit host FPU ops (https://github.com/FEX-Emu/FEX/commit/42a632093545d0bf74bb1d87e285e58fa18d0aef)
mtrack
Fixes 32-bit shmat, shmdt tracking, guaranteed invalidation atomicity (https://github.com/FEX-Emu/FEX/commit/d82d2944a9c7da66b77556b09f6c47c841f05503)
unittests
Reenable atomic tests on ARMv8.0 (https://github.com/FEX-Emu/FEX/commit/0fc6d6b6b52a0383945474849d9a32849795560c)
Investigate failing CI changes (https://github.com/FEX-Emu/FEX/commit/7227ee9b2ec17715f49f20106298d4a5b28e39f9)
Workaround runner issues (https://github.com/FEX-Emu/FEX/commit/ce5297b75f4b33871ccdafce2d3f72add2d27478)
Published by Sonicadvance1 over 2 years ago
Published by Sonicadvance1 over 2 years ago
JIT
ARMJIT
JITx86
OpcodeDispatcher
CPUID
ELFCodeLoader
FEXCore
FEXGetConfig
FEXLoader
IR
Linux
LinuxAllocator
Scripts
Telemetry
TestHarnessRunner
UContext
Misc
unittests
Published by Sonicadvance1 over 2 years ago
AArch64
CPUID
OpcodeDispatcher
IR
Softfloat
Misc
SocketLogging
FEXLogServer
FEXRootFSFetcher
FEXLoader
Published by Sonicadvance1 almost 3 years ago
A large amount of changes this month.
A new FEXRootFSFetcher tool for downloading prebuilt RootFS images.
A Python script for automatically setting up an Ubuntu PPA and RootFS.
Published by Sonicadvance1 almost 3 years ago
Published by Sonicadvance1 almost 3 years ago
Mark relevant Interpreter/JIT functions as [[nodiscard]] (43454abc)
IR
Frontend
Interpreter
JIT
JITSymbols
Arm64
OpcodeDispatcher
Published by Sonicadvance1 about 3 years ago
Published by skmp about 3 years ago
Arm64
Arm64Emitter
Config
EmulatedFiles
FEXBash
FEXConfig
FEXCore
FEXLoader
FEXMountDaemon
Hangover
Linux
RA
SignalDelegator
Misc
unittests
x86
Published by skmp about 3 years ago
64BitAllocator
AArch64
Arm64
CPUID
CPack
FEXLoader
FEXMountDaemon
FlexBitSet
GdbStub
General
Jits
Linux
OpDispatcher
OpcodeDispatcher
RCLSE
Misc
Published by skmp over 3 years ago
Published by skmp over 3 years ago
Published by skmp over 3 years ago
/proc/self/
, /proc/pid-self/
Published by skmp over 3 years ago
Published by skmp over 3 years ago
Published by skmp over 3 years ago
The detailed change log is available here