Changeset 73395 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jul 30, 2018 3:19:54 PM (6 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
r73389 r73395 1295 1295 if (pGuestFeatures->fVmx) 1296 1296 { 1297 *puValue = RT_BF_MAKE(VMX_BF_BASIC_VMCS_ID, VMX_ VMCS_REVISION_ID)1297 *puValue = RT_BF_MAKE(VMX_BF_BASIC_VMCS_ID, VMX_E_VMCS_REVISION_ID ) 1298 1298 | RT_BF_MAKE(VMX_BF_BASIC_DUAL_MON, 0 ) 1299 1299 | RT_BF_MAKE(VMX_BF_BASIC_VMCS_MEM_TYPE, VMX_BASIC_MEM_TYPE_WB ) … … 1437 1437 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr0Fixed0(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 1438 1438 { 1439 RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); 1440 *puValue = 0; 1439 RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); 1440 PCCPUMFEATURES pGuestFeatures = &pVCpu->CTX_SUFF(pVM)->cpum.s.GuestFeatures; 1441 if (pGuestFeatures->fVmx) 1442 *puValue = VMX_E_CR0_FIXED0; 1443 else 1444 *puValue = 0; 1441 1445 return VINF_SUCCESS; 1442 1446 } … … 1446 1450 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr0Fixed1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 1447 1451 { 1448 RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); 1449 *puValue = 0; 1452 RT_NOREF_PV(pRange); 1453 PCCPUMFEATURES pGuestFeatures = &pVCpu->CTX_SUFF(pVM)->cpum.s.GuestFeatures; 1454 if (pGuestFeatures->fVmx) 1455 { 1456 int rc = HMVmxGetHostMsr(pVCpu->CTX_SUFF(pVM), idMsr, puValue); 1457 AssertRCReturn(rc, rc); 1458 *puValue |= VMX_E_CR0_FIXED0; /* Make sure the CR0 MB1 bits are not clear. */ 1459 } 1460 else 1461 *puValue = 0; 1450 1462 return VINF_SUCCESS; 1451 1463 } … … 1455 1467 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr4Fixed0(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 1456 1468 { 1457 RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); 1458 *puValue = 0; 1469 RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); 1470 PCCPUMFEATURES pGuestFeatures = &pVCpu->CTX_SUFF(pVM)->cpum.s.GuestFeatures; 1471 if (pGuestFeatures->fVmx) 1472 *puValue = VMX_E_CR4_FIXED0; 1473 else 1474 *puValue = 0; 1459 1475 return VINF_SUCCESS; 1460 1476 } … … 1464 1480 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32VmxCr4Fixed1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 1465 1481 { 1466 RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); 1467 *puValue = 0; 1482 RT_NOREF_PV(pRange); 1483 PCCPUMFEATURES pGuestFeatures = &pVCpu->CTX_SUFF(pVM)->cpum.s.GuestFeatures; 1484 if (pGuestFeatures->fVmx) 1485 { 1486 int rc = HMVmxGetHostMsr(pVCpu->CTX_SUFF(pVM), idMsr, puValue); 1487 AssertRCReturn(rc, rc); 1488 *puValue |= VMX_E_CR4_FIXED0; /* Make sure the CR4 MB1 bits are not clear. */ 1489 } 1490 else 1491 *puValue = 0; 1468 1492 return VINF_SUCCESS; 1469 1493 } -
trunk/src/VBox/VMM/VMMAll/HMAll.cpp
r73389 r73395 581 581 582 582 583 #if 0 /** @todo Update comment hm_vmx.h VMXMSRS struct if this is removed. */584 583 /** 585 584 * Gets the specified VMX host MSR that was read by HM during ring-0 … … 633 632 return VINF_SUCCESS; 634 633 } 635 #endif636 634 637 635
Note:
See TracChangeset
for help on using the changeset viewer.