FEX-Emu / FEX-Emu/FEX

Cross-process tear free split-lock emulation can't be implemented without kernel support (or TME)

Open
#3,948 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
8k
Forks
351
Avg merge
12h 31m
Merged PRs (30d)
102

Description

In order to correctly handle split-lock emulation, we need a global mutex. We could easily get this through FEXServer handing a shared page to all FEXInterpreter instances.

The problem with this is that if a process dies when one of its threads is handling a split-lock (Or cross-16byte boundary atomic) then the mutex will be permanently set. Effectively hanging every running FEXInterpreter process on the system.

There's no way to work around this in a tear-free fashion and also never have hangs. It /needs/ to be done in the kernel.

The "alternative" and preferred approach would be if all ARM vendors just support TME, but that's never going to occur.

As for starting the discussion with the ARM kernel maintainers for getting this supported upstream...
![nope](https://github.com/user-attachments/assets/b202a8c8-529d-4810-8662-d95cf7533520)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.