You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do we map target execution threads to host threads, how we start, execute, suspend and stop them.
Design requirements:
Be as portable as possible, i. e. require only the bare minimum from the host platform. Currently these platforms are considered:
linux on x86_64
linux on arm64
windows on x86_64 (still needs some work, but should work in principle)
Atmosphere with libnx on arm64 (Nintendo switch homebrew)
Enforce strict mutual exclusion of thread execution (for both the target and native code). This is not required per se, but greatly reduces complexity (mostly concerning the memory ordering issues on arm64, which will require additional work on remill side of things)
Be preemptive, i. e. be able to switch threads when target code is executing (think: inifinite loop). This is only for target code, native code may be written so that it will not get stuck.
Different existing implementations:
qemu: make the code non-executable and handle the raised signal; needs to enforce special structure of the recompiled code (recompiled target code being separate from the native code). Needs some linker magic
LuaJIT: run hook in every looping path (can be changed to just an interrupt variable check). Needs some work on remill side and research into how to find good places to put the hook in LLVM IR (see 1, 2, 3)
luavela: similar approach; TODO: is it any different?
wine: Uses a combination of sending an async POSIX signal and select inside it. Good approach, but, unfortunately, works only on POSIX platforms, needs adaptation otherwise. (see 1, 2)
All of these approaches might be feasible in uwin, but portability should be considered. (The most restrictive platform for now is the Atmosphere).
The text was updated successfully, but these errors were encountered:
What is threading model?
How do we map target execution threads to host threads, how we start, execute, suspend and stop them.
Design requirements:
Different existing implementations:
All of these approaches might be feasible in uwin, but portability should be considered. (The most restrictive platform for now is the Atmosphere).
The text was updated successfully, but these errors were encountered: