- Timestamp:
- Jun 26, 2014 5:52:17 AM (11 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r51720 r51728 2285 2285 break; 2286 2286 2287 /* 2288 * Set the MWAIT Extensions Present bit in the MWAIT/MONITOR leaf. 2289 * This currently includes the Present bit and MWAITBREAK bit as well. 2290 */ 2291 case CPUMCPUIDFEATURE_MWAIT_EXTS: 2292 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000005), 0); 2293 if ( !pLeaf 2294 || !pVM->cpum.s.HostFeatures.fMWaitExtensions) 2295 { 2296 LogRel(("CPUM: WARNING! Can't turn on MWAIT Extensions when the host doesn't support it!\n")); 2297 return; 2298 } 2299 2300 /* Valid for both Intel and AMD. */ 2301 pVM->cpum.s.aGuestCpuIdStd[5].ecx = pLeaf->uEcx |= X86_CPUID_MWAIT_ECX_EXT | X86_CPUID_MWAIT_ECX_BREAKIRQIF0; 2302 pVM->cpum.s.GuestFeatures.fMWaitExtensions = 1; 2303 LogRel(("CPUM: SetGuestCpuIdFeature: Enabled MWAIT Extensions.\n")); 2304 break; 2305 2287 2306 default: 2288 2307 AssertMsgFailed(("enmFeature=%d\n", enmFeature)); … … 2320 2339 case CPUMCPUIDFEATURE_RDTSCP: return pVM->cpum.s.GuestFeatures.fRdTscP; 2321 2340 case CPUMCPUIDFEATURE_HVP: return pVM->cpum.s.GuestFeatures.fHypervisorPresent; 2341 case CPUMCPUIDFEATURE_MWAIT_EXTS: return pVM->cpum.s.GuestFeatures.fMWaitExtensions; 2322 2342 2323 2343 case CPUMCPUIDFEATURE_INVALID: … … 2418 2438 pVM->cpum.s.aGuestCpuIdStd[1].ecx = pLeaf->uEcx &= ~X86_CPUID_FEATURE_ECX_HVP; 2419 2439 pVM->cpum.s.GuestFeatures.fHypervisorPresent = 0; 2440 break; 2441 2442 case CPUMCPUIDFEATURE_MWAIT_EXTS: 2443 pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000005), 0); 2444 if (pLeaf) 2445 pVM->cpum.s.aGuestCpuIdStd[5].ecx = pLeaf->uEcx &= ~(X86_CPUID_MWAIT_ECX_EXT | X86_CPUID_MWAIT_ECX_BREAKIRQIF0); 2446 pVM->cpum.s.GuestFeatures.fMWaitExtensions = 0; 2447 Log(("CPUM: ClearGuestCpuIdFeature: Disabled MWAIT Extensions!\n")); 2420 2448 break; 2421 2449 -
trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
r51344 r51728 1420 1420 pFeatures->fMonitorMWait = RT_BOOL(paLeaves[1].uEcx & X86_CPUID_FEATURE_ECX_MONITOR); 1421 1421 1422 /* MWAIT/MONITOR leaf. */ 1423 PCCPUMCPUIDLEAF const pMWaitLeaf = cpumR3CpuIdFindLeaf(paLeaves, cLeaves, 5); 1424 if (pMWaitLeaf) 1425 { 1426 pFeatures->fMWaitExtensions = (pMWaitLeaf->uEcx & (X86_CPUID_MWAIT_ECX_EXT | X86_CPUID_MWAIT_ECX_BREAKIRQIF0)) 1427 == (X86_CPUID_MWAIT_ECX_EXT | X86_CPUID_MWAIT_ECX_BREAKIRQIF0); 1428 } 1429 1422 1430 /* Extended features. */ 1423 1431 PCCPUMCPUIDLEAF const pExtLeaf = cpumR3CpuIdFindLeaf(paLeaves, cLeaves, 0x80000001); -
trunk/src/VBox/VMM/include/CPUMInternal.h
r51517 r51728 155 155 /** MWAIT & MONITOR instructions supported. */ 156 156 uint32_t fMonitorMWait : 1; 157 /** MWAIT Extensions present. */ 158 uint32_t fMWaitExtensions : 1; 157 159 158 160 /** AMD64: Supports long mode. */ … … 173 175 174 176 /** Alignment padding. */ 175 uint32_t fPadding : 9;177 uint32_t fPadding : 8; 176 178 177 179 uint64_t auPadding[2];
Note:
See TracChangeset
for help on using the changeset viewer.