Changeset 70913 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Feb 8, 2018 3:11:15 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
r70071 r70913 1430 1430 return VINF_SUCCESS; 1431 1431 } 1432 1433 1434 /** @callback_method_impl{FNCPUMRDMSR} */ 1435 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32SpecCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 1436 { 1437 RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); 1438 *puValue = pVCpu->cpum.s.GuestMsrs.msr.SpecCtrl; 1439 return VINF_SUCCESS; 1440 } 1441 1442 1443 /** @callback_method_impl{FNCPUMWRMSR} */ 1444 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32SpecCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue) 1445 { 1446 RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue); 1447 1448 /* NB: The STIBP bit can be set even when IBRS is present, regardless of whether STIBP is actually implemented. */ 1449 if (uValue & ~(MSR_IA32_SPEC_CTRL_F_IBRS | MSR_IA32_SPEC_CTRL_F_STIBP)) 1450 { 1451 Log(("CPUM: Invalid IA32_SPEC_CTRL bits (trying to write %#llx)\n", uValue)); 1452 return VERR_CPUM_RAISE_GP_0; 1453 } 1454 1455 pVCpu->cpum.s.GuestMsrs.msr.SpecCtrl = uValue; 1456 return VINF_SUCCESS; 1457 } 1458 1459 1460 /** @callback_method_impl{FNCPUMWRMSR} */ 1461 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrWr_Ia32PredCmd(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue) 1462 { 1463 RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uValue); RT_NOREF_PV(uRawValue); 1464 return VINF_SUCCESS; 1465 } 1466 1467 1468 /** @callback_method_impl{FNCPUMRDMSR} */ 1469 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32ArchCapabilities(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 1470 { 1471 RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); 1472 *puValue = pVCpu->cpum.s.GuestMsrs.msr.ArchCaps; 1473 return VINF_SUCCESS; 1474 } 1475 1476 1432 1477 1433 1478 … … 4999 5044 cpumMsrRd_Ia32VmxTrueEntryCtls, 5000 5045 cpumMsrRd_Ia32VmxVmFunc, 5046 cpumMsrRd_Ia32SpecCtrl, 5047 cpumMsrRd_Ia32ArchCapabilities, 5001 5048 5002 5049 cpumMsrRd_Amd64Efer, … … 5242 5289 cpumMsrWr_Ia32X2ApicN, 5243 5290 cpumMsrWr_Ia32DebugInterface, 5291 cpumMsrWr_Ia32SpecCtrl, 5292 cpumMsrWr_Ia32PredCmd, 5244 5293 5245 5294 cpumMsrWr_Amd64Efer, … … 5712 5761 CPUM_ASSERT_RD_MSR_FN(Ia32VmxTrueEntryCtls); 5713 5762 CPUM_ASSERT_RD_MSR_FN(Ia32VmxVmFunc); 5763 CPUM_ASSERT_RD_MSR_FN(Ia32SpecCtrl); 5764 CPUM_ASSERT_RD_MSR_FN(Ia32ArchCapabilities); 5714 5765 5715 5766 CPUM_ASSERT_RD_MSR_FN(Amd64Efer); … … 5944 5995 CPUM_ASSERT_WR_MSR_FN(Ia32X2ApicN); 5945 5996 CPUM_ASSERT_WR_MSR_FN(Ia32DebugInterface); 5997 CPUM_ASSERT_WR_MSR_FN(Ia32SpecCtrl); 5998 CPUM_ASSERT_WR_MSR_FN(Ia32PredCmd); 5946 5999 5947 6000 CPUM_ASSERT_WR_MSR_FN(Amd64Efer);
Note:
See TracChangeset
for help on using the changeset viewer.