Changeset 78980 in vbox for trunk/include/VBox/vmm
- Timestamp:
- Jun 5, 2019 8:55:38 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpum.h
r78976 r78980 2009 2009 { 2010 2010 RT_NOREF(pVCpu); 2011 Assert( pCtx->hwvirt.enmHwvirt == CPUMHWVIRT_VMX);2012 Assert(pCtx->hwvirt.vmx.fInVmxNonRootMode);2013 Assert(p Ctx->hwvirt.vmx.CTX_SUFF(pVmcs));2014 return RT_BOOL(p Ctx->hwvirt.vmx.CTX_SUFF(pVmcs)->u32PinCtls & uPinCtls);2011 Assert(CPUMIsGuestInVmxNonRootMode(pCtx)); 2012 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); 2013 Assert(pVmcs); 2014 return RT_BOOL(pVmcs->u32PinCtls & uPinCtls); 2015 2015 } 2016 2016 … … 2030 2030 { 2031 2031 RT_NOREF(pVCpu); 2032 Assert( pCtx->hwvirt.enmHwvirt == CPUMHWVIRT_VMX);2033 Assert(pCtx->hwvirt.vmx.fInVmxNonRootMode);2034 Assert(p Ctx->hwvirt.vmx.CTX_SUFF(pVmcs));2035 return RT_BOOL(p Ctx->hwvirt.vmx.CTX_SUFF(pVmcs)->u32ProcCtls & uProcCtls);2032 Assert(CPUMIsGuestInVmxNonRootMode(pCtx)); 2033 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); 2034 Assert(pVmcs); 2035 return RT_BOOL(pVmcs->u32ProcCtls & uProcCtls); 2036 2036 } 2037 2037 … … 2052 2052 { 2053 2053 RT_NOREF(pVCpu); 2054 Assert( pCtx->hwvirt.enmHwvirt == CPUMHWVIRT_VMX);2055 Assert(pCtx->hwvirt.vmx.fInVmxNonRootMode);2056 Assert(p Ctx->hwvirt.vmx.CTX_SUFF(pVmcs));2057 return RT_BOOL(p Ctx->hwvirt.vmx.CTX_SUFF(pVmcs)->u32ProcCtls2 & uProcCtls2);2054 Assert(CPUMIsGuestInVmxNonRootMode(pCtx)); 2055 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); 2056 Assert(pVmcs); 2057 return RT_BOOL(pVmcs->u32ProcCtls2 & uProcCtls2); 2058 2058 } 2059 2059 … … 2073 2073 { 2074 2074 RT_NOREF(pVCpu); 2075 Assert( pCtx->hwvirt.enmHwvirt == CPUMHWVIRT_VMX);2076 Assert(pCtx->hwvirt.vmx.fInVmxNonRootMode);2077 Assert(p Ctx->hwvirt.vmx.CTX_SUFF(pVmcs));2078 return RT_BOOL(p Ctx->hwvirt.vmx.CTX_SUFF(pVmcs)->u32ExitCtls & uExitCtls);2075 Assert(CPUMIsGuestInVmxNonRootMode(pCtx)); 2076 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); 2077 Assert(pVmcs); 2078 return RT_BOOL(pVmcs->u32ExitCtls & uExitCtls); 2079 2079 } 2080 2080 … … 2094 2094 { 2095 2095 RT_NOREF(pVCpu); 2096 Assert( pCtx->hwvirt.enmHwvirt == CPUMHWVIRT_VMX);2097 Assert(pCtx->hwvirt.vmx.fInVmxNonRootMode);2098 Assert(p Ctx->hwvirt.vmx.CTX_SUFF(pVmcs));2099 return RT_BOOL(p Ctx->hwvirt.vmx.CTX_SUFF(pVmcs)->u32EntryCtls & uEntryCtls);2096 Assert(CPUMIsGuestInVmxNonRootMode(pCtx)); 2097 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); 2098 Assert(pVmcs); 2099 return RT_BOOL(pVmcs->u32EntryCtls & uEntryCtls); 2100 2100 } 2101 2101 … … 2121 2121 2122 2122 RT_NOREF(pVCpu); 2123 Assert(CPUMIsGuestInVmxNonRootMode(pCtx)); 2123 2124 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); 2124 2125 Assert(pVmcs); 2125 Assert(CPUMIsGuestInVmxNonRootMode(pCtx));2126 2126 2127 2127 /* NMIs have a dedicated VM-execution control for causing VM-exits. */ … … 2204 2204 { 2205 2205 RT_NOREF(pVCpu); 2206 Assert( pCtx->hwvirt.enmHwvirt == CPUMHWVIRT_VMX);2207 Assert(pCtx->hwvirt.vmx.fInVmxNonRootMode);2208 Assert(p Ctx->hwvirt.vmx.CTX_SUFF(pVmcs));2209 return p Ctx->hwvirt.vmx.CTX_SUFF(pVmcs)->u64AddrApicAccess.u;2206 Assert(CPUMIsGuestInVmxNonRootMode(pCtx)); 2207 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); 2208 Assert(pVmcs); 2209 return pVmcs->u64AddrApicAccess.u; 2210 2210 } 2211 2211 … … 2227 2227 */ 2228 2228 RT_NOREF(pVCpu); 2229 Assert(CPUMIsGuestInVmxNonRootMode(pCtx)); 2229 2230 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); 2230 2231 Assert(pVmcs); 2231 Assert(CPUMIsGuestInVmxNonRootMode(pCtx));2232 2232 uint64_t const uGstCr0 = pCtx->cr0; 2233 2233 uint64_t const fGstHostMask = pVmcs->u64Cr0Mask.u; … … 2253 2253 */ 2254 2254 RT_NOREF(pVCpu); 2255 Assert(CPUMIsGuestInVmxNonRootMode(pCtx)); 2255 2256 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); 2256 2257 Assert(pVmcs); 2257 Assert(CPUMIsGuestInVmxNonRootMode(pCtx));2258 2258 uint64_t const uGstCr4 = pCtx->cr4; 2259 2259 uint64_t const fGstHostMask = pVmcs->u64Cr4Mask.u; … … 2279 2279 */ 2280 2280 RT_NOREF(pVCpu); 2281 Assert(CPUMIsGuestInVmxNonRootMode(pCtx)); 2281 2282 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); 2282 2283 Assert(pVmcs); 2283 Assert(CPUMIsGuestInVmxNonRootMode(pCtx));2284 2284 2285 2285 uint32_t const fGstHostMask = pVmcs->u64Cr0Mask.u; … … 2329 2329 */ 2330 2330 RT_NOREF(pVCpu); 2331 Assert(CPUMIsGuestInVmxNonRootMode(pCtx)); 2331 2332 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); 2332 2333 Assert(pVmcs); 2333 Assert(CPUMIsGuestInVmxNonRootMode(pCtx));2334 2334 Assert(iCrReg == 0 || iCrReg == 4); 2335 2335 … … 2362 2362 * interrupts. 2363 2363 * 2364 * @returns VBox status code. 2365 * @retval true if it's ready, false otherwise. 2366 * 2364 * @returns @c true if it's ready, @c false otherwise. 2367 2365 * @param pVCpu The cross context virtual CPU structure of the calling EMT. 2368 2366 * @param pCtx The guest-CPU context. … … 2381 2379 2382 2380 /** 2381 * Checks whether the VMX nested-guest is blocking virtual-NMIs. 2382 * 2383 * @returns @c true if it's blocked, @c false otherwise. 2384 * @param pCtx The guest-CPU context. 2385 */ 2386 DECLINLINE(bool) CPUMIsGuestVmxVirtNmiBlocking(PCVMCPU pVCpu, PCCPUMCTX pCtx) 2387 { 2388 #ifdef IN_RC 2389 RT_NOREF2(pVCpu, pCtx); 2390 AssertReleaseFailedReturn(false); 2391 #else 2392 /* 2393 * Return the state of virtual-NMI blocking, if we are executing a 2394 * VMX nested-guest with virtual-NMIs enabled. 2395 */ 2396 Assert(CPUMIsGuestVmxPinCtlsSet(pVCpu, pCtx, VMX_PIN_CTLS_VIRT_NMI)); 2397 return pCtx->hwvirt.vmx.fVirtNmiBlocking; 2398 #endif 2399 } 2400 2401 /** 2383 2402 * Checks whether the VMX nested-guest is in a state to receive virtual interrupts 2384 2403 * (those injected with the "virtual-interrupt delivery" feature). 2385 2404 * 2386 * @returns VBox status code. 2387 * @retval true if it's ready, false otherwise. 2388 * 2405 * @returns @c true if it's ready, @c false otherwise. 2389 2406 * @param pVCpu The cross context virtual CPU structure of the calling EMT. 2390 2407 * @param pCtx The guest-CPU context. … … 2398 2415 RT_NOREF(pVCpu); 2399 2416 Assert(CPUMIsGuestInVmxNonRootMode(pCtx)); 2400 2401 if ( (pCtx->eflags.u & X86_EFL_IF) 2402 && !CPUMIsGuestVmxProcCtlsSet(pVCpu, pCtx, VMX_PROC_CTLS_INT_WINDOW_EXIT)) 2403 return true; 2404 return false; 2417 return RT_BOOL(pCtx->eflags.u & X86_EFL_IF); 2405 2418 #endif 2406 2419 }
Note:
See TracChangeset
for help on using the changeset viewer.