Changeset 70794 in vbox for trunk/src/VBox
- Timestamp:
- Jan 29, 2018 5:54:59 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
r70720 r70794 3490 3490 if (pCpum->GuestFeatures.enmCpuVendor == CPUMCPUVENDOR_AMD) 3491 3491 { 3492 /* 3493 * Older 64-bit linux kernels blindly assume that the AMD performance counters work 3494 * if X86_CPUID_AMD_ADVPOWER_EDX_TSCINVAR is set, see @bugref{7243#c85}. Exposing this 3495 * bit is now configurable. 3496 */ 3492 3497 pCurLeaf->uEdx &= 0 3493 3498 //| X86_CPUID_AMD_ADVPOWER_EDX_TS … … 3499 3504 //| X86_CPUID_AMD_ADVPOWER_EDX_MC 3500 3505 //| X86_CPUID_AMD_ADVPOWER_EDX_HWPSTATE 3501 #if 0 /* 3502 * We don't expose X86_CPUID_AMD_ADVPOWER_EDX_TSCINVAR, because newer 3503 * Linux kernels blindly assume that the AMD performance counters work 3504 * if this is set for 64 bits guests. (Can't really find a CPUID feature 3505 * bit for them though.) 3506 */ 3507 /** @todo need to recheck this with new MSR emulation. */ 3508 | X86_CPUID_AMD_ADVPOWER_EDX_TSCINVAR 3509 #endif 3506 | X86_CPUID_AMD_ADVPOWER_EDX_TSCINVAR 3510 3507 //| X86_CPUID_AMD_ADVPOWER_EDX_CPB RT_BIT(9) 3511 3508 //| X86_CPUID_AMD_ADVPOWER_EDX_EFRO RT_BIT(10) … … 3516 3513 else 3517 3514 pCurLeaf->uEdx &= X86_CPUID_AMD_ADVPOWER_EDX_TSCINVAR; 3518 if ( pConfig->fInvariantTsc)3519 pCurLeaf->uEdx |=X86_CPUID_AMD_ADVPOWER_EDX_TSCINVAR;3515 if (!pConfig->fInvariantTsc) 3516 pCurLeaf->uEdx &= ~X86_CPUID_AMD_ADVPOWER_EDX_TSCINVAR; 3520 3517 uSubLeaf++; 3521 3518 } … … 3874 3871 AssertLogRelRCReturn(rc, rc); 3875 3872 3876 /** @cfgm{/CPUM/InvariantTsc, boolean, complicated}3877 * Set the invariant TSC flag in 0x80000007 if true, otherwas take default3878 * action. By default the flag is passed thru as is from the host CPU, except3879 * on AMD CPUs where it's suppressed to avoid trouble from linux assuming we3880 * virtualize performance counters.3881 */ 3882 rc = CFGMR3QueryBoolDef(pCpumCfg, "InvariantTsc", &pConfig->fInvariantTsc, false);3873 /** @cfgm{/CPUM/InvariantTsc, boolean, true} 3874 * Pass-through the invariant TSC flag in 0x80000007 if available on the host 3875 * CPU. On AMD CPUs, users may wish to suppress it to avoid trouble from older 3876 * 64-bit linux guests which assume the presence of AMD performance counters 3877 * that we do not virtualize. 3878 */ 3879 rc = CFGMR3QueryBoolDef(pCpumCfg, "InvariantTsc", &pConfig->fInvariantTsc, true); 3883 3880 AssertLogRelRCReturn(rc, rc); 3884 3881
Note:
See TracChangeset
for help on using the changeset viewer.