aex-emu:github/fork/Sonicadvance1/vdso_implementation

Last commit made on 2022-09-02
Get this branch:
git clone -b github/fork/Sonicadvance1/vdso_implementation https://git.launchpad.net/aex-emu

Branch merges

Branch information

Name:
github/fork/Sonicadvance1/vdso_implementation
Repository:
lp:aex-emu

Recent commits

c5a7fc1... by FEX-Emu

Resolve most VDSO comments

0869b0a... by FEX-Emu

FEXLinuxTests: Adds a VDSO test

Ensures VDSO is working as correctly as it can.

4e81f84... by FEX-Emu

ELFCodeLoader: Load VDSO thunk at application startup

This ensures it will always be available to the application as long as
the library is installed.

8fa27d2... by FEX-Emu

Thunks: Adds VDSO thunk library

VDSO is heavily abused by Proton games to the point it is showing up as
CPU time.
Implement a guest-facing only thunk library using the hardcoded VDSO
interface in Thunks.

If available this will always be loaded on application load and set the
auxv value to support it.

This requires a bit of special treatment as our first user of linker
scripts since the format of the ELF must be careful crafted to not break
applications trying to parse it.

This library exposes a handful of symbols:
- clock_gettime
- clock_getres
- gettimeofday
- time
- getcpu
- All previous with `__vdso_` prefix
- LINUX_2.6

All of these symbols get routed directly to the host architecture VDSO
interface if they exist.
AArch64 doesn't have getcpu or time VDSO.

In a microbench, VDSO improved bench times substantially
x86-64 host: 3.612s -> 1.369s - 2.63x speed
AArch64 host: 3.821s -> 2.284s - 1.67x speed
  - AArch64 isn't as improved due to missing VDSO symbols

This is also our first /always/ enabled thunk as long as the file exists

e5a8a29... by FEX-Emu

Thunks: Add support for lds linker script on Guest libraries

This is going to be necessary in the next commit

f967f53... by FEX-Emu

Thunks: Adds VDSO specific thunks

x86-64 has five symbols within VDSO that we need to emulate.

Pass this through either glibc or host vdso if the symbol exists.
AArch64 doesn't have the time or getcpu vdso interface, so fall down
glibc instead.

31fefaa... by FEX-Emu

Merge pull request #1969 from Sonicadvance1/fexrootfsfetcher_fix_crash

FEXRootFSFetcher: Fix crash if curl fails to download rootfs definition file

7f9edbf... by FEX-Emu

Merge pull request #1968 from Sonicadvance1/new_domain

New domain.

760b9c8... by FEX-Emu

FEXRootFSFetcher: Fix crash if curl fails to download rootfs definition file

This can happen when the link goes down or internet blip.

cc7fb00... by FEX-Emu

New domain.

Needed to fix FEXRootFSFetcher from #1967