Ryan Houdek
edd1dfdfe8
Merge pull request #1040 from Sonicadvance1/more_syscalls_5_12
...
Implements more syscalls for supporting a higher guest kernel version
2021-06-01 00:27:50 -07:00
Ryan Houdek
4243ed19a4
Merge pull request #1037 from Sonicadvance1/fexconfig_downgrade
...
FEXConfig: Allow lower GL versions
2021-06-01 00:14:04 -07:00
Ryan Houdek
0b7587768d
Unifies 32bit and 64bit clone implementation
...
Syscall entry points still have different argument orders,
Moves the arguments to the clone3 argument structure and passes to generic handler.
Also implements clone3 while doing this
2021-05-27 23:00:00 -07:00
Ryan Houdek
d115a57fe6
Implements support for execveat
2021-05-27 22:59:57 -07:00
Ryan Houdek
4c74478610
Implements iouring syscalls
...
This is a very simple initial implementation.
io_uring allows some things that are hard to capture like setting personalities.
Assume sane usage for now
2021-05-27 22:59:55 -07:00
Ryan Houdek
77a111cf19
Implements process_madvise 64-bit syscall
2021-05-27 22:59:52 -07:00
Ryan Houdek
7e551e5f88
Implements epoll_pwait2 syscall
2021-05-27 22:59:49 -07:00
Ryan Houdek
9d44dfdca6
Actually updated the hardcoded guest kernel locations
...
Just a couple of files and uname syscall
2021-05-27 22:59:47 -07:00
Ryan Houdek
a7858f4d37
Calculates a guest kernel version for FEX instead
...
Takes the host kernel version and makes sure it fits in our supported kernel range
Minimum kernel version FEX reports to the guest is 5.0
Maximum kernel version FEX reports to the guest is currently 5.12
2021-05-27 22:59:44 -07:00
Ryan Houdek
6b3b10f8ae
Implements pidfd_send_signal syscall
...
Now that we know when to forward a siginfo_t to the guest, we can allow this syscall
2021-05-27 22:59:42 -07:00
Ryan Houdek
9d5fa64f68
Implements pidfd_open syscall
2021-05-27 22:59:39 -07:00
Ryan Houdek
8b3bbd0ea1
Implements openat2
2021-05-27 22:59:37 -07:00
Ryan Houdek
cc477b6964
Implements close_range syscall
2021-05-27 22:59:34 -07:00
Ryan Houdek
912d019ad8
Implements pidfd_getfd syscall
...
Rise of the Tomb Raider launcher uses this without checking host kernel version.
Might be part of their crash handler.
2021-05-27 18:44:12 -07:00
Ryan Houdek
822a08f271
FEXConfig: Allow lower GL versions
...
Automatically fall back through older GL versions
This allows us to freely support GL 3.0, 2.1 and ES 2.0.
Should fix an issue where Pi devices don't support GL 3.0 in all configs
External imgui had to be updated to fix an issue with ES 2.0
Fixes #1036
2021-05-26 18:45:03 -07:00
Stefanos Kornilios Mitsis Poiitidis
d70c91ddc6
AOTIR: Multi-threaded AOTGen
2021-05-19 14:19:55 +03:00
Stefanos Kornilios Mitsis Poiitidis
370f36c8f7
Merge pull request #1027 from Sonicadvance1/fix_ppoll
...
ppoll fixes
2021-05-18 09:20:32 +03:00
Ryan Houdek
3d09a55715
Ignore non-canonical addresses in FS/GS setting
2021-05-12 22:17:13 -07:00
Ryan Houdek
c103f54774
Merge pull request #1028 from Sonicadvance1/remove_syscall_forwards
...
Removes syscall forward errno preprocessor implementation
2021-05-12 22:04:30 -07:00
Ryan Houdek
dc7437b8c6
Merge pull request #1018 from FEX-Emu/skmp/streamable-aotir
...
AOTIR: .aotir files are now streamed out
2021-05-12 22:04:17 -07:00
Ryan Houdek
8cf1b0263d
Removes syscall forward errno preprocessor implementation
...
This was causing issues with syscalls returning errors.
Remove it and move on
2021-05-12 21:53:45 -07:00
Stefanos Kornilios Mitsis Poiitidis
7ecaf24e8b
Merge pull request #1030 from Sonicadvance1/disable_userfaultfd
...
Disable userfaultfd until supported
2021-05-12 09:45:43 +03:00
Stefanos Kornilios Mitsis Poiitidis
52f7ea5433
Merge pull request #1029 from Sonicadvance1/fix_fadvise64
...
Fix fadvise64
2021-05-12 09:45:21 +03:00
Stefanos Kornilios Mitsis Poiitidis
023a32ea26
Merge pull request #1026 from Sonicadvance1/fix_flag_remapping
...
Handle FD flag remapping correctly
2021-05-12 09:39:39 +03:00
Stefanos Kornilios Mitsis Poiitidis
36980131e0
Merge pull request #1024 from Sonicadvance1/signal_fixes
...
Sigaction fixes
2021-05-12 09:34:51 +03:00
Stefanos Kornilios Mitsis Poiitidis
b2eb13fa1c
Merge pull request #1023 from Sonicadvance1/emulate_map_32bit
...
Emulate MAP_32BIT in mmap
2021-05-12 09:34:18 +03:00
Stefanos Kornilios Mitsis Poiitidis
27b6497bee
Merge pull request #1031 from Sonicadvance1/fix_epoll
...
Use epoll syscalls directly
2021-05-12 09:33:59 +03:00
Stefanos Kornilios Mitsis Poiitidis
66ee89ec8a
Merge pull request #1022 from Sonicadvance1/fix_uname
...
Fix uname
2021-05-12 09:22:58 +03:00
Stefanos Kornilios Mitsis Poiitidis
bee73199e1
Merge pull request #1021 from Sonicadvance1/fix_thread_self
...
Support redirecting thread-self exe softlink
2021-05-12 09:22:36 +03:00
Stefanos Kornilios Mitsis Poiitidis
0e6db843ef
Merge pull request #1020 from Sonicadvance1/invalid_syscall
...
Return ENOSYS on too large of syscall number
2021-05-12 09:21:17 +03:00
Ryan Houdek
783ceb2d56
Use epoll syscalls directly
2021-05-11 18:51:06 -07:00
Ryan Houdek
d1fc65daaa
Disable userfaultfd until supported
...
Until we properly wrap this we can't support it
2021-05-11 18:44:31 -07:00
Ryan Houdek
94f464e1a4
Fix fadvise64
...
posix variant still doesn't quite match the actual syscall implementation
2021-05-11 18:39:00 -07:00
Ryan Houdek
dfb15aaeb9
ppoll fixes
...
glibc implementation makes a copy of the timeout and the kernel is expected to update it
Can't use the glibc implementation because of this.
2021-05-11 18:33:24 -07:00
Ryan Houdek
565f0e6af3
Handle FD flag remapping correctly
...
FD flag remapping was broken. It would remap one flag on to another and then the next check would remap it back.
Instead keep a mask of the flags to be remapped then remap them all at the end.
Also goes through the ops and fixes a few cases where it was remapping wrong flags.
2021-05-11 18:29:21 -07:00
Ryan Houdek
b03554bb7d
Sigaction fixes
...
Check for invalid sigsetsize
Since we are using SignalDelegator we don't use errno, so just return Result and check for Result == 0
2021-05-11 18:22:23 -07:00
Ryan Houdek
7b8cb5107a
Emulate MAP_32BIT in mmap
...
If we are on AArch64 then MAP_32BIT doesn't exist.
Emulate it by setting the address as a hint to the kernel so it scans bottom up
2021-05-11 18:18:59 -07:00
Ryan Houdek
cbb20ef6c6
Fix uname
...
There is a domainname variable that was missed
2021-05-11 18:16:35 -07:00
Ryan Houdek
298481f9af
Support redirecting thread-self exe softlink
2021-05-11 18:15:14 -07:00
Ryan Houdek
0d108cd8fd
Return ENOSYS on too large of syscall number
2021-05-11 18:14:02 -07:00
Ryan Houdek
490d7e57d7
Arguments file needs one additional null argument to finish the arguments.
2021-05-11 18:12:16 -07:00
Ryan Houdek
fe77c3ef06
Fix cpuinfo needing tabs on its options and PM option
...
Depending on option it is split by anywhere from zero to two tabs
2021-05-11 18:12:16 -07:00
Ryan Houdek
eb02afe952
Merge pull request #1013 from Sonicadvance1/fix_openat_symlinks
...
Handles symlinks in rootfs in openat
2021-05-11 17:52:07 -07:00
Stefanos Kornilios Mitsis Poiitidis
df8f1850ae
AOTIR: .aotir files are now stream-written
2021-05-11 14:37:12 +03:00
Ryan Houdek
e282fd2221
Merge pull request #1016 from Sonicadvance1/ioctl32_micro_optimization
...
Microoptimization for the DRM ioctls
2021-05-10 21:14:16 -07:00
Ryan Houdek
83b4188569
Microoptimization for the DRM ioctls
...
For DRM applications have a three FD deep MRU cached for faster lookups of FD to DRM handlers.
In a completely DRM ioctl bound situation like es2gears or GL application without threaded context
Then this puts us /nearly/ at the performance of calling the ioctl32 handler directly.
Sadly there is overhead that can't be overcome so this is the best that can be done from userland
2021-05-06 02:55:22 -07:00
Ryan Houdek
36fdd7f6e2
FEXConfig: Fixes INotify watcher never coming up
...
Inverted this check on accident
2021-05-05 19:44:31 -07:00
Ryan Houdek
9be67fb22a
Merge pull request #1009 from Sonicadvance1/handle_self
...
Handle more cases of an application pinging self
2021-05-05 14:51:11 -07:00
Ryan Houdek
cb9286c11e
Merge pull request #1012 from Sonicadvance1/fix_ioctl_errors
...
Fixes ioctl returning error
2021-05-05 14:50:46 -07:00
Ryan Houdek
19e45544fb
Handles symlinks in rootfs in openat
...
This fixes an issue where rootfs has symlinks to other things in the rootfs so we need to track it through.
Relies on #1009 to be merged first.
Fixes any application that relies on libblas, mpv for example.
2021-05-04 22:13:52 -07:00