mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-15 03:08:36 +12:00
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:
parent
1a0392bf15
commit
bf6044fced
3 changed files with 15 additions and 3 deletions
|
@ -82,6 +82,12 @@ bool utils::has_tsx_force_abort()
|
|||
return g_value;
|
||||
}
|
||||
|
||||
bool utils::has_rtm_always_abort()
|
||||
{
|
||||
static const bool g_value = get_cpuid(0, 0)[0] >= 0x7 && (get_cpuid(7, 0)[3] & 0x800) == 0x800;
|
||||
return g_value;
|
||||
}
|
||||
|
||||
bool utils::has_mpx()
|
||||
{
|
||||
static const bool g_value = get_cpuid(0, 0)[0] >= 0x7 && (get_cpuid(7, 0)[1] & 0x4000) == 0x4000;
|
||||
|
@ -230,11 +236,15 @@ std::string utils::get_system_info()
|
|||
result += "-FA";
|
||||
}
|
||||
|
||||
if (!has_mpx())
|
||||
if (!has_mpx() || has_tsx_force_abort())
|
||||
{
|
||||
result += " disabled by default";
|
||||
}
|
||||
}
|
||||
else if (has_rtm_always_abort())
|
||||
{
|
||||
result += " | TSX disabled via microcode";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue