SPU/SYSINFO: Disable TSX by default for TSX-FA cpus (#11105)

- Also detect the new RTM_ALWAYS_ABORT bit in cpuid
- This new bit indicates that RTM is disabled in the microcode
- On cpus with RTM_ALWAYS_ABORT TSX can be renabled by writing 0x4 to the msr 0x0000010F
This commit is contained in:
Whatcookie 2021-11-04 12:44:25 -04:00 committed by GitHub
parent 1a0392bf15
commit bf6044fced
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 3 deletions

View file

@ -713,7 +713,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool
initalize_timebased_time();
// Set RTM usage
g_use_rtm = utils::has_rtm() && ((utils::has_mpx() && g_cfg.core.enable_TSX == tsx_usage::enabled) || g_cfg.core.enable_TSX == tsx_usage::forced);
g_use_rtm = utils::has_rtm() && (((utils::has_mpx() && !utils::has_tsx_force_abort()) && g_cfg.core.enable_TSX == tsx_usage::enabled) || g_cfg.core.enable_TSX == tsx_usage::forced);
if (!add_only)
{
@ -726,7 +726,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool
#endif
sys_log.notice("Used configuration:\n%s\n", g_cfg.to_string());
if (g_use_rtm && !utils::has_mpx())
if (g_use_rtm && (!utils::has_mpx() || utils::has_tsx_force_abort()))
{
sys_log.warning("TSX forced by User");
}