mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-10 16:00:31 +02:00
The dispatcher was saving AVX state even though FEX doesn't support it currently. This is due to it checking for the config option rather than the HostFeatures option. The `EnableAVX` config option is supposed to be used to inform FEXCore if we want AVX disabled or not when the host supports the feature. In this case it is universally enabled because we haven't encountered any games that have issues with AVX state being saved with signals. (We know they exist, we just don't have configurations for them). The HostFeatures option `SupportsAVX` is the option that is supposed to be getting used for determining if the runtime AVX feature is enabled. This also had an issue though that this was **also** always enabled if running on an x86 host with AVX, or an ARM host with SVE2-256bit. It was then disabled if the config option was disabled; But, since FEX-Emu doesn't support AVX fully yet, we need to ensure this isn't yet enabled. But this only solves half the problem. In order for our CI to test AVX features before fully supporting AVX, it needs to be able to enable AVX so that the CPU state is correctly saved. So we need to change the default configuration option to be false, and have CI enable it for the tests that matter before AVX is fully implemented.
421 lines
13 KiB
Plaintext
421 lines
13 KiB
Plaintext
{
|
|
"Options": {
|
|
"CPU": {
|
|
"Core": {
|
|
"Type": "uint32",
|
|
"Default": "FEXCore::Config::ConfigCore::CONFIG_IRJIT",
|
|
"TextDefault": "irjit",
|
|
"ShortArg": "c",
|
|
"Choices": [ "irint", "irjit", "host" ],
|
|
"ArgumentHandler": "CoreHandler",
|
|
"Desc": [
|
|
"Which CPU core to use",
|
|
"host only exists on x86_64",
|
|
"[irint, irjit, host]"
|
|
]
|
|
},
|
|
"Multiblock": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"ShortArg": "m",
|
|
"Desc": [
|
|
"Controls multiblock code compilation",
|
|
"Can cause long JIT compilation times and stutter"
|
|
]
|
|
},
|
|
"MaxInst": {
|
|
"Type": "int32",
|
|
"Default": "5000",
|
|
"ShortArg": "n",
|
|
"Desc": [
|
|
"Maximum number of instruction to store in a block"
|
|
]
|
|
},
|
|
"Threads": {
|
|
"Type": "uint32",
|
|
"Default": "0",
|
|
"ShortArg": "T",
|
|
"Desc": [
|
|
"Number of physical hardware threads to tell the process we have.",
|
|
"0 will auto detect."
|
|
]
|
|
},
|
|
"CacheObjectCodeCompilation": {
|
|
"Type": "uint32",
|
|
"Default": "FEXCore::Config::ConfigObjectCodeHandler::CONFIG_NONE",
|
|
"TextDefault": "none",
|
|
"Choices": [ "none", "read", "readwrite" ],
|
|
"ArgumentHandler": "CacheObjectCodeHandler",
|
|
"Desc": [
|
|
"Cache JIT object code to drive.",
|
|
"Allows JIT code to be shared between applications"
|
|
]
|
|
},
|
|
"EnableAVX": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Determines whether or not we use the expanded register file for AVX or not"
|
|
]
|
|
}
|
|
},
|
|
"Emulation": {
|
|
"RootFS": {
|
|
"Type": "str",
|
|
"Default": "",
|
|
"ShortArg": "R",
|
|
"Desc": [
|
|
"Which Root filesystem prefix to use",
|
|
"This can be a filesystem path",
|
|
"\teg: ~/RootFS/Debian_x86_64",
|
|
"Or this can be a name of a rootfs",
|
|
"If the named rootfs exists in the FEX data folder then it will use that one",
|
|
"\teg: $HOME/.fex-emu/RootFS/<RootFS name>/",
|
|
"Or if you have XDG_DATA_HOME the config will search in that directory",
|
|
"\teg: $XDG_DATA_HOME/.fex-emu/RootFS/<RootFS name>/"
|
|
]
|
|
},
|
|
"ThunkHostLibs": {
|
|
"Type": "str",
|
|
"Default": "@CMAKE_INSTALL_PREFIX@/lib/fex-emu/HostThunks/",
|
|
"ShortArg": "t",
|
|
"Desc": [
|
|
"Folder to find the host-side thunking libraries."
|
|
]
|
|
},
|
|
"ThunkGuestLibs": {
|
|
"Type": "str",
|
|
"Default": "@CMAKE_INSTALL_PREFIX@/share/fex-emu/GuestThunks/",
|
|
"ShortArg": "j",
|
|
"Desc": [
|
|
"Folder to find the guest-side thunking libraries."
|
|
]
|
|
},
|
|
"ThunkHostLibs32": {
|
|
"Type": "str",
|
|
"Default": "@CMAKE_INSTALL_PREFIX@/lib/fex-emu/HostThunks_32/",
|
|
"Desc": [
|
|
"Folder to find the 32-bit host-side thunking libraries."
|
|
]
|
|
},
|
|
"ThunkGuestLibs32": {
|
|
"Type": "str",
|
|
"Default": "@CMAKE_INSTALL_PREFIX@/share/fex-emu/GuestThunks_32/",
|
|
"Desc": [
|
|
"Folder to find the 32-bit guest-side thunking libraries."
|
|
]
|
|
},
|
|
"ThunkConfig": {
|
|
"Type": "str",
|
|
"Default": "",
|
|
"ShortArg": "k",
|
|
"Desc": [
|
|
"A json file specifying where to overlay the thunks.",
|
|
"This can be a filesystem path",
|
|
"\teg: ~/MyThunkConfig.json",
|
|
"Or this can be a named of a Thunk config file",
|
|
"If the named config file exists in the FEX data folder folder the it will use that one",
|
|
"\teg: $HOME/.fex-emu/ThunkConfigs/<ThunkConfig name>",
|
|
"Or if you have XDG_DATA_HOME the config will search in that directory",
|
|
"\teg: $XDG_DATA_HOME/.fex-emu/ThunkConfigs/<ThunkConfig name>"
|
|
]
|
|
},
|
|
"Env": {
|
|
"Type": "strarray",
|
|
"Default": "",
|
|
"ShortArg": "E",
|
|
"Desc": [
|
|
"Adds an environment variable to the emulated environment."
|
|
]
|
|
},
|
|
"HostEnv": {
|
|
"Type": "strarray",
|
|
"Default": "",
|
|
"ShortArg": "H",
|
|
"Desc": [
|
|
"Adds an environment variable to the host environment.",
|
|
"This can be useful for setting environment variables that thunks can pick up.",
|
|
"Typically isn't necessary since the guest libc isn't thunked. But is possible."
|
|
]
|
|
},
|
|
"AdditionalArguments": {
|
|
"Type": "strarray",
|
|
"Default": "",
|
|
"Desc": [
|
|
"Allows the user to pass additional arguments to the application"
|
|
]
|
|
}
|
|
},
|
|
"Debug": {
|
|
"SingleStep": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"ShortArg": "S",
|
|
"Desc": [
|
|
"Single stepping configuration."
|
|
]
|
|
},
|
|
"GdbServer": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"ShortArg": "G",
|
|
"Desc": [
|
|
"Enables the GDB server."
|
|
]
|
|
},
|
|
"DumpIR": {
|
|
"Type": "str",
|
|
"Default": "no",
|
|
"Desc": [
|
|
"Folder to dump the IR in to.",
|
|
"[no, stdout, stderr, <Folder>]"
|
|
]
|
|
},
|
|
"DumpGPRs": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"ShortArg": "g",
|
|
"Desc": [
|
|
"When the test harness ends, print the GPR state."
|
|
]
|
|
},
|
|
"O0": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"ShortArg": "O0",
|
|
"Desc": [
|
|
"Disables optimizations passes for debugging."
|
|
]
|
|
},
|
|
"SRA": {
|
|
"Type": "bool",
|
|
"Default": "true",
|
|
"Desc": [
|
|
"Set to false to disable Static Register Allocation"
|
|
]
|
|
},
|
|
"Force32BitAllocator": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Forces use of the 32-bit allocator on 32-bit applications",
|
|
"Used to work around ulimit problems of CI runner",
|
|
"Potentially useful for debugging memory problems",
|
|
"32-bit allocator is always used if your host kernel is older than 4.17"
|
|
]
|
|
},
|
|
"GlobalJITNaming": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Uses JITSymbols to name all JIT state as one symbol",
|
|
"Useful for querying how much time is spent inside of the JIT",
|
|
"Profiling tools will show JIT time as FEXJIT"
|
|
]
|
|
},
|
|
"LibraryJITNaming": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Uses JITSymbols to name JIT symbols grouped by library",
|
|
"Useful for querying how much time is spent in each guest library",
|
|
"Can be used to help guide thunk generation"
|
|
]
|
|
},
|
|
"BlockJITNaming": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Uses JITSymbols to name JIT symbols",
|
|
"Useful for determining hot blocks of code",
|
|
"Has some file writing overhead per JIT block"
|
|
]
|
|
},
|
|
"GDBSymbols": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Integrates with GDB using the JIT interface.",
|
|
"Needs the fex jit loader in GDB, which can be loaded via `jit-reader-load libFEXGDBReader.so.`",
|
|
"Also needs x86_64-linux-gnu-objdump in PATH.",
|
|
"Can be very slow."
|
|
]
|
|
},
|
|
"InjectLibSegFault": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Sets the environment variable LD_PRELOAD=libSegFault.so",
|
|
"This allows the user to very easily enable libSegFault without dealing with environment variables",
|
|
"Very useful for applications that have launch scripts that set the variable to nothing at launch",
|
|
"Set this in an application configuration for injecting in to only specific applications.",
|
|
"\tNote: If x86/x86_64 libSegFault.so isn't installed then this option won't work."
|
|
]
|
|
}
|
|
},
|
|
"Logging": {
|
|
"SilentLog": {
|
|
"Type": "bool",
|
|
"Default": "true",
|
|
"ShortArg": "s",
|
|
"Desc": [
|
|
"Disables logging"
|
|
]
|
|
},
|
|
"OutputLog": {
|
|
"Type": "str",
|
|
"Default": "server",
|
|
"ShortArg": "o",
|
|
"Desc": [
|
|
"File to write FEX output to.",
|
|
"[stdout, stderr, server, <Filename>]"
|
|
]
|
|
}
|
|
},
|
|
"Hacks": {
|
|
"SMCChecks": {
|
|
"Type": "uint8",
|
|
"Default": "FEXCore::Config::CONFIG_SMC_MTRACK",
|
|
"TextDefault": "mtrack",
|
|
"ArgumentHandler": "SMCCheckHandler",
|
|
"Desc": [
|
|
"Checks code for modification before execution.",
|
|
"\tnone: No checks",
|
|
"\tmtrack: Page tracking based invalidation",
|
|
"\tfull: Validate code before every run (slow)",
|
|
"\tmman: Invalidate on mmap, mprotect, munmap (deprecated, use mtrack)"
|
|
]
|
|
},
|
|
"TSOEnabled": {
|
|
"Type": "bool",
|
|
"Default": "true",
|
|
"Desc": [
|
|
"Controls TSO IR ops.",
|
|
"Highly likely to break any multithreaded application if disabled."
|
|
]
|
|
},
|
|
"TSOAutoMigration": {
|
|
"Type": "bool",
|
|
"Default": "true",
|
|
"Desc": [
|
|
"Automatically enables TSO when shared memory is used.",
|
|
"Should work without issues in most cases."
|
|
]
|
|
},
|
|
"X87ReducedPrecision": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Emulates X87 floating point using 64-bit precision. This reduces emulation accuracy and may result in rendering bugs."
|
|
]
|
|
},
|
|
"ABILocalFlags": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"When enabled enables an optimization around flags.",
|
|
"Assumes flags are not used across cals.",
|
|
"Hand-written assembly can violate this assumption."
|
|
]
|
|
},
|
|
"ABINoPF": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"When enabled enables an optimization around parity flag calculation.",
|
|
"Removes the calculation of the parity flag from GPR instructions.",
|
|
"Assuming no uses rely on it"
|
|
]
|
|
},
|
|
"ParanoidTSO": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Makes TSO operations even more strict.",
|
|
"Forces vector loadstores to also become atomic."
|
|
]
|
|
},
|
|
"StallProcess": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Forces a process to stall out on initialization",
|
|
"Useful for a process that keeps restarting and doesn't work"
|
|
]
|
|
},
|
|
"HideHypervisorBit": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Hides the hypervisor CPUID bit when set.",
|
|
"Should only be used for applications that have issues with this set."
|
|
]
|
|
}
|
|
},
|
|
"Misc": {
|
|
"AOTIRCapture": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Captures IR and generates an AOT IR cache.",
|
|
"Captures both the loaded executable and libraries it loads."
|
|
]
|
|
},
|
|
"AOTIRGenerate": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Scans file for executable code and generates an AOT IR cache.",
|
|
"Does not run the executable."
|
|
]
|
|
},
|
|
"AOTIRLoad": {
|
|
"Type": "bool",
|
|
"Default": "false",
|
|
"Desc": [
|
|
"Loads an AOT IR cache for the loaded executable."
|
|
]
|
|
},
|
|
"ServerSocketPath": {
|
|
"Type": "str",
|
|
"Default": "",
|
|
"Desc": [
|
|
"Override for a FEXServer socket path. Only useful for chroots."
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"UnnamedOptions": {
|
|
"Misc": {
|
|
"IS_INTERPRETER": {
|
|
"Type": "bool",
|
|
"Default": "false"
|
|
},
|
|
"INTERPRETER_INSTALLED": {
|
|
"Type": "bool",
|
|
"Default": "false"
|
|
},
|
|
"APP_FILENAME": {
|
|
"Type": "str",
|
|
"Default": ""
|
|
},
|
|
"APP_CONFIG_NAME": {
|
|
"Type": "str",
|
|
"Default": "",
|
|
"Desc": [
|
|
"This is the application config name that has been loaded.",
|
|
"This differs from APP_FILENAME in two ways",
|
|
"Where APP_FILENAME always points to the executable path that FEX-Emu is executing.",
|
|
"This matches what is used to load the AppLayer configuration name.",
|
|
"When running through a compatibility layer like wine, this will only be the exe name, instead of wine full path."
|
|
]
|
|
},
|
|
"IS64BIT_MODE": {
|
|
"Type": "bool",
|
|
"Default": "false"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|