Changeset 73628 in vbox
- Timestamp:
- Aug 13, 2018 7:45:01 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
include/VBox/vmm/hm_vmx.h (modified) (4 diffs)
-
src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp (modified) (1 diff)
-
src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r73606 r73628 1237 1237 * instructions. */ 1238 1238 #define VMX_MISC_ENTRY_INJECT_SOFT_INT RT_BIT(30) 1239 /** Maximum number of MSRs in the VMCS, (n+1)*512. */1239 /** Maximum number of MSRs in the auto-load/store MSR areas, (n+1) * 512. */ 1240 1240 #define VMX_MISC_MAX_MSRS(a_MiscMsr) (512 * (RT_BF_GET((a_MiscMsr), VMX_BF_MISC_MAX_MSRS) + 1)) 1241 /** Maximum CR3-target count supported by the CPU. */ 1242 #define VMX_MISC_CR3_TARGET_COUNT(a_MiscMsr) (((a) >> 16) & 0xff) 1241 1243 /** Relationship between the preemption timer and tsc. */ 1242 1244 #define VMX_BF_MISC_PREEMPT_TIMER_TSC_SHIFT 0 … … 1286 1288 /** @} */ 1287 1289 1290 /** Maximum number of CR3 target supported by VT-x */ 1291 #define VMX_VMCS_CTRL_CR3_TARGET_COUNT_MAX 4 1288 1292 1289 1293 /** @name VMX MSR - VMCS enumeration. … … 1574 1578 #define VMX_VMCS_CTRL_CR3_TARGET_VAL1 0x600a 1575 1579 #define VMX_VMCS_CTRL_CR3_TARGET_VAL2 0x600c 1576 #define VMX_VMCS_CTRL_CR3_TARGET_VAL3 10x600e1580 #define VMX_VMCS_CTRL_CR3_TARGET_VAL3 0x600e 1577 1581 /** @} */ 1578 1582 … … 2523 2527 #define VMX_V_VMCS_PHYSADDR_4G_LIMIT 0 2524 2528 2529 /** @name Virtual VMX MSR - Miscellaneous data. 2530 * @{ */ 2531 /** Number of CR3-target values supported. */ 2532 #define VMX_V_CR3_TARGET_COUNT 4 2533 /** Activity states supported. */ 2534 #define VMX_V_GUEST_ACTIVITY_STATE_MASK (VMX_VMCS_GUEST_ACTIVITY_HLT) 2535 /** VMX preemption-timer shift (Core i7-2600 taken as reference). */ 2536 #define VMX_V_PREEMPT_TIMER_SHIFT 5 2537 /** Maximum number of MSRs in the auto-load/store MSR areas, (n+1) * 512. */ 2538 #define VMX_V_MAX_MSRS 0 2539 /** SMM MSEG revision ID. */ 2540 #define VMX_V_MSEG_REV_ID 0 2541 /** @} */ 2542 2525 2543 /** 2526 2544 * Virtual VMX-instruction diagnostics. -
trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
r73606 r73628 1455 1455 if (pGuestFeatures->fVmx) 1456 1456 { 1457 /** @todo Think about this especially preemption timer TSC shifts. */ 1458 *puValue = 0; 1457 uint64_t uHostMsr; 1458 int rc = HMVmxGetHostMsr(pVCpu->CTX_SUFF(pVM), idMsr, &uHostMsr); 1459 AssertRCReturn(rc, rc); 1460 uint8_t const cMaxMsrs = RT_MIN(RT_BF_GET(uHostMsr, VMX_BF_MISC_MAX_MSRS), VMX_V_MAX_MSRS); 1461 *puValue = RT_BF_MAKE(VMX_BF_MISC_PREEMPT_TIMER_TSC, VMX_V_PREEMPT_TIMER_SHIFT ) 1462 | RT_BF_MAKE(VMX_BF_MISC_EXIT_STORE_EFER_LMA, pGuestFeatures->fVmxExitStoreEferLma ) 1463 | RT_BF_MAKE(VMX_BF_MISC_ACTIVITY_STATES, VMX_V_GUEST_ACTIVITY_STATE_MASK ) 1464 | RT_BF_MAKE(VMX_BF_MISC_PT, 0 ) 1465 | RT_BF_MAKE(VMX_BF_MISC_SMM_READ_SMBASE_MSR, 0 ) 1466 | RT_BF_MAKE(VMX_BF_MISC_CR3_TARGET, VMX_V_CR3_TARGET_COUNT ) 1467 | RT_BF_MAKE(VMX_BF_MISC_MAX_MSRS, cMaxMsrs ) 1468 | RT_BF_MAKE(VMX_BF_MISC_VMXOFF_BLOCK_SMI, 0 ) 1469 | RT_BF_MAKE(VMX_BF_MISC_VMWRITE_ALL, pGuestFeatures->fVmxVmwriteAll ) 1470 | RT_BF_MAKE(VMX_BF_MISC_ENTRY_INJECT_SOFT_INT, pGuestFeatures->fVmxEntryInjectSoftInt) 1471 | RT_BF_MAKE(VMX_BF_MISC_MSEG_ID, VMX_V_MSEG_REV_ID ); 1459 1472 } 1460 1473 else -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r73606 r73628 337 337 Assert(!pVCpu->cpum.GstCtx.hwvirt.vmx.fInVmxNonRootMode); 338 338 339 /** @todo NSTVMX: Unblock INIT. */340 339 if (fSmmMonitorCtl & MSR_IA32_SMM_MONITOR_VMXOFF_UNBLOCK_SMI) 341 340 { /** @todo NSTVMX: Unblock SMI. */ }
Note:
See TracChangeset
for help on using the changeset viewer.

