Changeset 72358 in vbox for trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
- Timestamp:
- May 28, 2018 2:47:51 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
r72208 r72358 232 232 233 233 234 /** 235 * Get fixed IA32_FEATURE_CONTROL value for NEM and cpumMsrRd_Ia32FeatureControl. 236 * 237 * @returns Fixed IA32_FEATURE_CONTROL value. 238 * @param pVCpu The cross context per CPU structure. 239 */ 240 VMM_INT_DECL(uint64_t) CPUMGetGuestIa32FeatureControl(PVMCPU pVCpu) 241 { 242 RT_NOREF_PV(pVCpu); 243 return 1; /* Locked, no VT-X, no SYSENTER micromanagement. */ 244 } 245 234 246 /** @callback_method_impl{FNCPUMRDMSR} */ 235 247 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32FeatureControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 236 248 { 237 RT_NOREF_PV( pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);238 *puValue = 1; /* Locked, no VT-X, no SYSENTER micromanagement. */249 RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); 250 *puValue = CPUMGetGuestIa32FeatureControl(pVCpu); 239 251 return VINF_SUCCESS; 240 252 } … … 384 396 385 397 386 /** @callback_method_impl{FNCPUMRDMSR} */ 387 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 388 { 389 RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); 398 /** 399 * Get fixed IA32_MTRR_CAP value for NEM and cpumMsrRd_Ia32MtrrCap. 400 * 401 * @returns Fixed IA32_MTRR_CAP value. 402 * @param pVCpu The cross context per CPU structure. 403 */ 404 VMM_INT_DECL(uint64_t) CPUMGetGuestIa32MtrrCap(PVMCPU pVCpu) 405 { 406 RT_NOREF_PV(pVCpu); 390 407 391 408 /* This is currently a bit weird. :-) */ … … 394 411 bool const fFixedRangeRegisters = false; 395 412 bool const fWriteCombiningType = false; 396 *puValue = cVariableRangeRegs 397 | (fFixedRangeRegisters ? RT_BIT_64(8) : 0) 398 | (fWriteCombiningType ? RT_BIT_64(10) : 0) 399 | (fSystemManagementRangeRegisters ? RT_BIT_64(11) : 0); 413 return cVariableRangeRegs 414 | (fFixedRangeRegisters ? RT_BIT_64(8) : 0) 415 | (fWriteCombiningType ? RT_BIT_64(10) : 0) 416 | (fSystemManagementRangeRegisters ? RT_BIT_64(11) : 0); 417 } 418 419 /** @callback_method_impl{FNCPUMRDMSR} */ 420 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 421 { 422 RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); 423 *puValue = CPUMGetGuestIa32MtrrCap(pVCpu); 400 424 return VINF_SUCCESS; 401 425 }
Note:
See TracChangeset
for help on using the changeset viewer.