FEX-Emu / FEX-Emu/FEX

Self Modifying Code (SMC) Support

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

Description

#### Overview
X86 has fully coherent icache, and in some models, prefetch queue and OoO buffers are also coherent (citation needed, unit test pending).

This means that in order to be fully correct we need to detect code changes when they happen, execute only new code after the write completes, across all threads, and that no thread should observe any other thread running stale code.

FEX currently supports 4 modes of SMC
- No support
- Mman (Invalidation around mmap, munmap, etc apis)
- Mtrack (Mman + segfault based detection of changes)
- Full (Disables most cross-block optimisations, checks every instruction for modification before executing it)

(@skmp todo: fill with more information about what actually is supported, next tasks, related tickets, etc)

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.