Files
FEX-Emu--FEX/Source/Tools/LinuxEmulation/LinuxSyscalls/x64/NotImplemented.cpp
T
Ryan Houdek eeff198ff1 LinuxEmulation: Update syscalls for v6.11
Only thing added was uretprobe on x86-64. We can't support this so just
return ENOSYS.
2024-10-02 14:40:11 -07:00

44 lines
1.5 KiB
C++

// SPDX-License-Identifier: MIT
/*
$info$
tags: LinuxSyscalls|syscalls-x86-64
$end_info$
*/
#include <FEXCore/Utils/LogManager.h>
#include "LinuxSyscalls/Syscalls.h"
#include "LinuxSyscalls/x64/Syscalls.h"
#include <errno.h>
#include <stdint.h>
namespace FEXCore::Core {
struct CpuStateFrame;
}
namespace FEX::HLE::x64 {
#define REGISTER_SYSCALL_NOT_IMPL_X64(name) \
REGISTER_SYSCALL_IMPL_X64(name, [](FEXCore::Core::CpuStateFrame* Frame) -> uint64_t { \
LogMan::Msg::DFmt("Using deprecated/removed syscall: " #name); \
return -ENOSYS; \
});
#define REGISTER_SYSCALL_NOT_IMPL_SAFE_X64(name) \
REGISTER_SYSCALL_IMPL_X64(name, [](FEXCore::Core::CpuStateFrame* Frame) -> uint64_t { return -ENOSYS; });
#define REGISTER_SYSCALL_NO_PERM_X64(name) \
REGISTER_SYSCALL_IMPL_X64(name, [](FEXCore::Core::CpuStateFrame* Frame) -> uint64_t { return -EPERM; });
// these are removed/not implemented in the linux kernel we present
void RegisterNotImplemented(FEX::HLE::SyscallHandler* Handler) {
REGISTER_SYSCALL_NOT_IMPL_X64(tuxcall);
REGISTER_SYSCALL_NOT_IMPL_X64(security);
REGISTER_SYSCALL_NOT_IMPL_X64(set_thread_area);
REGISTER_SYSCALL_NOT_IMPL_X64(get_thread_area);
REGISTER_SYSCALL_NOT_IMPL_X64(epoll_ctl_old);
REGISTER_SYSCALL_NOT_IMPL_X64(epoll_wait_old);
REGISTER_SYSCALL_NO_PERM_X64(kexec_file_load);
REGISTER_SYSCALL_NOT_IMPL_SAFE_X64(uretprobe);
}
} // namespace FEX::HLE::x64