Changeset 93257 in vbox
- Timestamp:
- Jan 17, 2022 8:03:19 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 149319
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r93223 r93257 1295 1295 1296 1296 /* Basic information. */ 1297 uint8_t const fTrueVmxMsrs = 1; 1297 1298 { 1298 1299 uint64_t const u64Basic = RT_BF_MAKE(VMX_BF_BASIC_VMCS_ID, VMX_V_VMCS_REVISION_ID ) … … 1302 1303 | RT_BF_MAKE(VMX_BF_BASIC_VMCS_MEM_TYPE, VMX_BASIC_MEM_TYPE_WB ) 1303 1304 | RT_BF_MAKE(VMX_BF_BASIC_VMCS_INS_OUTS, pGuestFeatures->fVmxInsOutInfo) 1304 | RT_BF_MAKE(VMX_BF_BASIC_TRUE_CTLS, 0);1305 | RT_BF_MAKE(VMX_BF_BASIC_TRUE_CTLS, fTrueVmxMsrs ); 1305 1306 pGuestVmxMsrs->u64Basic = u64Basic; 1306 1307 } … … 1318 1319 fAllowed0, fAllowed1, fFeatures)); 1319 1320 pGuestVmxMsrs->PinCtls.u = RT_MAKE_U64(fAllowed0, fAllowed1); 1321 1322 /* True pin-based VM-execution controls. */ 1323 if (fTrueVmxMsrs) 1324 { 1325 /* VMX_PIN_CTLS_DEFAULT1 contains MB1 reserved bits and must be reserved MB1 in true pin-based controls as well. */ 1326 pGuestVmxMsrs->TruePinCtls.u = RT_MAKE_U64(fAllowed0, fAllowed1); 1327 } 1320 1328 } 1321 1329 … … 1349 1357 fAllowed1, fFeatures)); 1350 1358 pGuestVmxMsrs->ProcCtls.u = RT_MAKE_U64(fAllowed0, fAllowed1); 1359 1360 /* True processor-based VM-execution controls. */ 1361 if (fTrueVmxMsrs) 1362 { 1363 /* VMX_PROC_CTLS_DEFAULT1 contains MB1 reserved bits but the following are not really reserved. */ 1364 uint32_t const fTrueAllowed0 = VMX_PROC_CTLS_DEFAULT1 & ~( VMX_BF_PROC_CTLS_CR3_LOAD_EXIT_MASK 1365 | VMX_BF_PROC_CTLS_CR3_STORE_EXIT_MASK); 1366 uint32_t const fTrueAllowed1 = fFeatures | fTrueAllowed0; 1367 pGuestVmxMsrs->TruePinCtls.u = RT_MAKE_U64(fTrueAllowed0, fTrueAllowed1); 1368 } 1351 1369 } 1352 1370 … … 1407 1425 fAllowed1, fFeatures)); 1408 1426 pGuestVmxMsrs->ExitCtls.u = RT_MAKE_U64(fAllowed0, fAllowed1); 1427 1428 /* True VM-exit controls. */ 1429 if (fTrueVmxMsrs) 1430 { 1431 /* VMX_EXIT_CTLS_DEFAULT1 contains MB1 reserved bits but the following are not really reserved */ 1432 uint32_t const fTrueAllowed0 = VMX_EXIT_CTLS_DEFAULT1 & ~VMX_BF_EXIT_CTLS_SAVE_DEBUG_MASK; 1433 uint32_t const fTrueAllowed1 = fFeatures | fTrueAllowed0; 1434 pGuestVmxMsrs->TrueEntryCtls.u = RT_MAKE_U64(fTrueAllowed0, fTrueAllowed1); 1435 } 1409 1436 } 1410 1437 … … 1420 1447 fAllowed1, fFeatures)); 1421 1448 pGuestVmxMsrs->EntryCtls.u = RT_MAKE_U64(fAllowed0, fAllowed1); 1449 1450 /* True VM-entry controls. */ 1451 if (fTrueVmxMsrs) 1452 { 1453 /* VMX_ENTRY_CTLS_DEFAULT1 contains MB1 reserved bits but the following are not really reserved */ 1454 uint32_t const fTrueAllowed0 = VMX_ENTRY_CTLS_DEFAULT1 & ~( VMX_BF_ENTRY_CTLS_LOAD_DEBUG_MASK 1455 | VMX_BF_ENTRY_CTLS_IA32E_MODE_GUEST_MASK 1456 | VMX_BF_ENTRY_CTLS_ENTRY_SMM_MASK 1457 | VMX_BF_ENTRY_CTLS_DEACTIVATE_DUAL_MON_MASK); 1458 uint32_t const fTrueAllowed1 = fFeatures | fTrueAllowed0; 1459 pGuestVmxMsrs->TrueEntryCtls.u = RT_MAKE_U64(fTrueAllowed0, fTrueAllowed1); 1460 } 1422 1461 } 1423 1462
Note:
See TracChangeset
for help on using the changeset viewer.