Changeset 81665 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Nov 5, 2019 9:48:53 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134425
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
r80333 r81665 1263 1263 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 1264 1264 if ( CPUMIsGuestInVmxNonRootMode(&pVCpu->cpum.s.Guest) 1265 && CPUMIsGuestVmxProcCtls2Set( pVCpu,&pVCpu->cpum.s.Guest, VMX_PROC_CTLS2_VIRT_X2APIC_MODE))1265 && CPUMIsGuestVmxProcCtls2Set(&pVCpu->cpum.s.Guest, VMX_PROC_CTLS2_VIRT_X2APIC_MODE)) 1266 1266 { 1267 1267 VBOXSTRICTRC rcStrict = IEMExecVmxVirtApicAccessMsr(pVCpu, idMsr, puValue, false /* fWrite */); … … 1283 1283 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 1284 1284 if ( CPUMIsGuestInVmxNonRootMode(&pVCpu->cpum.s.Guest) 1285 && CPUMIsGuestVmxProcCtls2Set( pVCpu,&pVCpu->cpum.s.Guest, VMX_PROC_CTLS2_VIRT_X2APIC_MODE))1285 && CPUMIsGuestVmxProcCtls2Set(&pVCpu->cpum.s.Guest, VMX_PROC_CTLS2_VIRT_X2APIC_MODE)) 1286 1286 { 1287 1287 VBOXSTRICTRC rcStrict = IEMExecVmxVirtApicAccessMsr(pVCpu, idMsr, &uValue, true /* fWrite */); -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r80814 r81665 1884 1884 1885 1885 if (CPUMIsGuestInVmxNonRootMode(&pVCpu->cpum.s.Guest)) 1886 return CPUMIsGuestVmxPhysIntrEnabled( pVCpu,&pVCpu->cpum.s.Guest);1886 return CPUMIsGuestVmxPhysIntrEnabled(&pVCpu->cpum.s.Guest); 1887 1887 1888 1888 Assert(CPUMIsGuestInSvmNestedHwVirtMode(&pVCpu->cpum.s.Guest)); … … 1902 1902 VMM_INT_DECL(bool) CPUMIsGuestVirtIntrEnabled(PVMCPU pVCpu) 1903 1903 { 1904 Assert(CPUMIsGuestInNestedHwvirtMode(&pVCpu->cpum.s.Guest)); 1905 1906 if (CPUMIsGuestInVmxNonRootMode(&pVCpu->cpum.s.Guest)) 1907 return CPUMIsGuestVmxVirtIntrEnabled(pVCpu, &pVCpu->cpum.s.Guest); 1908 1909 Assert(CPUMIsGuestInSvmNestedHwVirtMode(&pVCpu->cpum.s.Guest)); 1910 return CPUMIsGuestSvmVirtIntrEnabled(pVCpu, &pVCpu->cpum.s.Guest); 1904 PCCPUMCTX pCtx = &pVCpu->cpum.s.Guest; 1905 Assert(CPUMIsGuestInNestedHwvirtMode(pCtx)); 1906 1907 if (CPUMIsGuestInVmxNonRootMode(pCtx)) 1908 return CPUMIsGuestVmxVirtIntrEnabled(pCtx); 1909 1910 Assert(CPUMIsGuestInSvmNestedHwVirtMode(pCtx)); 1911 return CPUMIsGuestSvmVirtIntrEnabled(pVCpu, pCtx); 1911 1912 } 1912 1913 … … 2012 2013 if ( !CPUMIsGuestInNestedHwvirtMode(pCtx) 2013 2014 || CPUMIsGuestInSvmNestedHwVirtMode(pCtx) 2014 || !CPUMIsGuestVmxPinCtlsSet(p VCpu, pCtx, VMX_PIN_CTLS_VIRT_NMI))2015 || !CPUMIsGuestVmxPinCtlsSet(pCtx, VMX_PIN_CTLS_VIRT_NMI)) 2015 2016 return VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_BLOCK_NMIS); 2016 2017 … … 2019 2020 * VMX nested-guest with virtual-NMIs enabled. 2020 2021 */ 2021 return CPUMIsGuestVmxVirtNmiBlocking(p VCpu, pCtx);2022 return CPUMIsGuestVmxVirtNmiBlocking(pCtx); 2022 2023 } 2023 2024 … … 2044 2045 if ( !CPUMIsGuestInNestedHwvirtMode(pCtx) 2045 2046 || CPUMIsGuestInSvmNestedHwVirtMode(pCtx) 2046 || !CPUMIsGuestVmxPinCtlsSet(p VCpu, pCtx, VMX_PIN_CTLS_VIRT_NMI))2047 || !CPUMIsGuestVmxPinCtlsSet(pCtx, VMX_PIN_CTLS_VIRT_NMI)) 2047 2048 { 2048 2049 if (fBlock) … … 2063 2064 * VMX nested-guest with virtual-NMIs enabled. 2064 2065 */ 2065 return CPUMSetGuestVmxVirtNmiBlocking(p VCpu, pCtx, fBlock);2066 return CPUMSetGuestVmxVirtNmiBlocking(pCtx, fBlock); 2066 2067 } 2067 2068 … … 2213 2214 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); 2214 2215 Assert(pVmcs); 2215 if (CPUMIsGuestVmxProcCtlsSet(p VCpu, pCtx, VMX_PROC_CTLS_USE_TSC_OFFSETTING))2216 if (CPUMIsGuestVmxProcCtlsSet(pCtx, VMX_PROC_CTLS_USE_TSC_OFFSETTING)) 2216 2217 return uTscValue + pVmcs->u64TscOffset.u; 2217 2218 return uTscValue; … … 2248 2249 if (CPUMIsGuestInVmxNonRootMode(pCtx)) 2249 2250 { 2250 if (CPUMIsGuestVmxProcCtlsSet(p VCpu, pCtx, VMX_PROC_CTLS_USE_TSC_OFFSETTING))2251 if (CPUMIsGuestVmxProcCtlsSet(pCtx, VMX_PROC_CTLS_USE_TSC_OFFSETTING)) 2251 2252 { 2252 2253 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); … … 2750 2751 { 2751 2752 PCCPUMCTX pCtx = &pVCpu->cpum.s.Guest; 2752 if (CPUMIsGuestVmxProcCtlsSet(p VCpu, pCtx, VMX_PROC_CTLS_UNCOND_IO_EXIT))2753 if (CPUMIsGuestVmxProcCtlsSet(pCtx, VMX_PROC_CTLS_UNCOND_IO_EXIT)) 2753 2754 return true; 2754 2755 2755 if (CPUMIsGuestVmxProcCtlsSet(p VCpu, pCtx, VMX_PROC_CTLS_USE_IO_BITMAPS))2756 if (CPUMIsGuestVmxProcCtlsSet(pCtx, VMX_PROC_CTLS_USE_IO_BITMAPS)) 2756 2757 { 2757 2758 uint8_t const *pbIoBitmap = (uint8_t const *)pCtx->hwvirt.vmx.CTX_SUFF(pvIoBitmap); … … 2781 2782 PCCPUMCTX pCtx = &pVCpu->cpum.s.Guest; 2782 2783 PCVMXVVMCS pVmcs = pCtx->hwvirt.vmx.CTX_SUFF(pVmcs); 2783 if (CPUMIsGuestVmxProcCtlsSet(p VCpu, pCtx, VMX_PROC_CTLS_CR3_LOAD_EXIT))2784 if (CPUMIsGuestVmxProcCtlsSet(pCtx, VMX_PROC_CTLS_CR3_LOAD_EXIT)) 2784 2785 { 2785 2786 uint32_t const uCr3TargetCount = pVmcs->u32Cr3TargetCount; … … 2821 2822 * Without VMCS shadowing, all VMREAD and VMWRITE instructions are intercepted. 2822 2823 */ 2823 if (!CPUMIsGuestVmxProcCtls2Set( pVCpu,&pVCpu->cpum.s.Guest, VMX_PROC_CTLS2_VMCS_SHADOWING))2824 if (!CPUMIsGuestVmxProcCtls2Set(&pVCpu->cpum.s.Guest, VMX_PROC_CTLS2_VMCS_SHADOWING)) 2824 2825 return true; 2825 2826 -
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r81605 r81665 398 398 */ 399 399 # define IEM_VMX_IS_PINCTLS_SET(a_pVCpu, a_PinCtl) \ 400 (CPUMIsGuestVmxPinCtlsSet( (a_pVCpu),IEM_GET_CTX(a_pVCpu), (a_PinCtl)))400 (CPUMIsGuestVmxPinCtlsSet(IEM_GET_CTX(a_pVCpu), (a_PinCtl))) 401 401 402 402 /** … … 404 404 */ 405 405 #define IEM_VMX_IS_PROCCTLS_SET(a_pVCpu, a_ProcCtl) \ 406 (CPUMIsGuestVmxProcCtlsSet( (a_pVCpu),IEM_GET_CTX(a_pVCpu), (a_ProcCtl)))406 (CPUMIsGuestVmxProcCtlsSet(IEM_GET_CTX(a_pVCpu), (a_ProcCtl))) 407 407 408 408 /** … … 411 411 */ 412 412 #define IEM_VMX_IS_PROCCTLS2_SET(a_pVCpu, a_ProcCtl2) \ 413 (CPUMIsGuestVmxProcCtls2Set( (a_pVCpu),IEM_GET_CTX(a_pVCpu), (a_ProcCtl2)))413 (CPUMIsGuestVmxProcCtls2Set(IEM_GET_CTX(a_pVCpu), (a_ProcCtl2))) 414 414 415 415 /** … … 5446 5446 if (pVCpu->cpum.GstCtx.hwvirt.vmx.fVirtNmiBlocking) 5447 5447 { 5448 Assert(CPUMIsGuestVmxPinCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PIN_CTLS_VIRT_NMI));5448 Assert(CPUMIsGuestVmxPinCtlsSet(&pVCpu->cpum.GstCtx, VMX_PIN_CTLS_VIRT_NMI)); 5449 5449 fBlockNmi = false; 5450 5450 } … … 13820 13820 Assert(CPUMIsGuestVmxInterceptEvents(&pVCpu->cpum.GstCtx)); 13821 13821 if ( VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_VMX_NMI_WINDOW) 13822 && CPUMIsGuestVmxVirtNmiBlocking( pVCpu,&pVCpu->cpum.GstCtx))13822 && CPUMIsGuestVmxVirtNmiBlocking(&pVCpu->cpum.GstCtx)) 13823 13823 { 13824 13824 rcStrict = iemVmxVmexit(pVCpu, VMX_EXIT_NMI_WINDOW, 0 /* u64ExitQual */); … … 13826 13826 } 13827 13827 else if ( VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_VMX_INT_WINDOW) 13828 && CPUMIsGuestVmxVirtIntrEnabled( pVCpu,&pVCpu->cpum.GstCtx))13828 && CPUMIsGuestVmxVirtIntrEnabled(&pVCpu->cpum.GstCtx)) 13829 13829 { 13830 13830 rcStrict = iemVmxVmexit(pVCpu, VMX_EXIT_INT_WINDOW, 0 /* u64ExitQual */); … … 14261 14261 fIntrEnabled = pVCpu->cpum.GstCtx.eflags.Bits.u1IF; 14262 14262 else if (CPUMIsGuestInVmxNonRootMode(IEM_GET_CTX(pVCpu))) 14263 fIntrEnabled = CPUMIsGuestVmxPhysIntrEnabled( pVCpu,IEM_GET_CTX(pVCpu));14263 fIntrEnabled = CPUMIsGuestVmxPhysIntrEnabled(IEM_GET_CTX(pVCpu)); 14264 14264 else 14265 14265 { … … 16231 16231 if (CPUMIsGuestInVmxNonRootMode(IEM_GET_CTX(pVCpu))) 16232 16232 { 16233 Assert(CPUMIsGuestVmxProcCtls2Set( pVCpu,IEM_GET_CTX(pVCpu), VMX_PROC_CTLS2_VIRT_APIC_ACCESS));16234 Assert(CPUMGetGuestVmxApicAccessPageAddr( pVCpu,IEM_GET_CTX(pVCpu)) == GCPhysAccessBase);16233 Assert(CPUMIsGuestVmxProcCtls2Set(IEM_GET_CTX(pVCpu), VMX_PROC_CTLS2_VIRT_APIC_ACCESS)); 16234 Assert(CPUMGetGuestVmxApicAccessPageAddr(IEM_GET_CTX(pVCpu)) == GCPhysAccessBase); 16235 16235 16236 16236 /** @todo NSTVMX: How are we to distinguish instruction fetch accesses here? -
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r81091 r81665 5386 5386 { 5387 5387 /* CR0/CR4 reads are subject to masking when in VMX non-root mode. */ 5388 case 0: crX = CPUMGetGuestVmxMaskedCr0( pVCpu,&pVCpu->cpum.GstCtx, pVmcs->u64Cr0Mask.u); break;5389 case 4: crX = CPUMGetGuestVmxMaskedCr4( pVCpu,&pVCpu->cpum.GstCtx, pVmcs->u64Cr4Mask.u); break;5388 case 0: crX = CPUMGetGuestVmxMaskedCr0(&pVCpu->cpum.GstCtx, pVmcs->u64Cr0Mask.u); break; 5389 case 4: crX = CPUMGetGuestVmxMaskedCr4(&pVCpu->cpum.GstCtx, pVmcs->u64Cr4Mask.u); break; 5390 5390 5391 5391 case 3: … … 5429 5429 PCVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 5430 5430 Assert(pVmcs); 5431 u64MaskedCr0 = CPUMGetGuestVmxMaskedCr0( pVCpu,&pVCpu->cpum.GstCtx, pVmcs->u64Cr0Mask.u);5431 u64MaskedCr0 = CPUMGetGuestVmxMaskedCr0(&pVCpu->cpum.GstCtx, pVmcs->u64Cr0Mask.u); 5432 5432 } 5433 5433 uint64_t const u64GuestCr0 = u64MaskedCr0; … … 5482 5482 PCVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 5483 5483 Assert(pVmcs); 5484 u64MaskedCr0 = CPUMGetGuestVmxMaskedCr0( pVCpu,&pVCpu->cpum.GstCtx, pVmcs->u64Cr0Mask.u);5484 u64MaskedCr0 = CPUMGetGuestVmxMaskedCr0(&pVCpu->cpum.GstCtx, pVmcs->u64Cr0Mask.u); 5485 5485 } 5486 5486 uint64_t const u64GuestCr0 = u64MaskedCr0; -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r81640 r81665 2844 2844 2845 2845 uint16_t const uNewMsw = *pu16NewMsw; 2846 if (CPUMIsGuestVmxLmswInterceptSet( pVCpu,&pVCpu->cpum.GstCtx, uNewMsw))2846 if (CPUMIsGuestVmxLmswInterceptSet(&pVCpu->cpum.GstCtx, uNewMsw)) 2847 2847 { 2848 2848 Log2(("lmsw: Guest intercept -> VM-exit\n")); … … 2960 2960 2961 2961 uint64_t const uNewCrX = *puNewCrX; 2962 if (CPUMIsGuestVmxMovToCr0Cr4InterceptSet( pVCpu,&pVCpu->cpum.GstCtx, iCrReg, uNewCrX))2962 if (CPUMIsGuestVmxMovToCr0Cr4InterceptSet(&pVCpu->cpum.GstCtx, iCrReg, uNewCrX)) 2963 2963 { 2964 2964 Log2(("mov_Cr_Rd: (CR%u) Guest intercept -> VM-exit\n", iCrReg)); … … 3698 3698 || (fFlags & (IEM_XCPT_FLAGS_BP_INSTR | IEM_XCPT_FLAGS_OF_INSTR | IEM_XCPT_FLAGS_ICEBP_INSTR))) 3699 3699 { 3700 fIntercept = CPUMIsGuestVmxXcptInterceptSet( pVCpu,&pVCpu->cpum.GstCtx, uVector, uErrCode);3700 fIntercept = CPUMIsGuestVmxXcptInterceptSet(&pVCpu->cpum.GstCtx, uVector, uErrCode); 3701 3701 } 3702 3702 else -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r81638 r81665 997 997 bool const fRemoveCtls = !pVmxTransient->fIsNestedGuest 998 998 ? true 999 : !CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, uProcCtls);999 : !CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, uProcCtls); 1000 1000 #else 1001 1001 NOREF(pVCpu); … … 1864 1864 else 1865 1865 { 1866 pVmcsInfo->pbVirtApic = (uint8_t *)CPUMGetGuestVmxVirtApicPage(pVCpu, &pVCpu->cpum.GstCtx, 1867 &pVmcsInfo->HCPhysVirtApic); 1866 pVmcsInfo->pbVirtApic = (uint8_t *)CPUMGetGuestVmxVirtApicPage(&pVCpu->cpum.GstCtx, &pVmcsInfo->HCPhysVirtApic); 1868 1867 Assert(pVmcsInfo->pbVirtApic); 1869 1868 Assert(pVmcsInfo->HCPhysVirtApic && pVmcsInfo->HCPhysVirtApic != NIL_RTHCPHYS); … … 4593 4592 */ 4594 4593 if ( pVmxTransient->fIsNestedGuest 4595 && ( CPUMIsGuestVmxEntryCtlsSet(p VCpu, pCtx, VMX_ENTRY_CTLS_LOAD_EFER_MSR)4596 || CPUMIsGuestVmxExitCtlsSet(p VCpu, pCtx, VMX_EXIT_CTLS_SAVE_EFER_MSR)4597 || CPUMIsGuestVmxExitCtlsSet(p VCpu, pCtx, VMX_EXIT_CTLS_LOAD_EFER_MSR)))4594 && ( CPUMIsGuestVmxEntryCtlsSet(pCtx, VMX_ENTRY_CTLS_LOAD_EFER_MSR) 4595 || CPUMIsGuestVmxExitCtlsSet(pCtx, VMX_EXIT_CTLS_SAVE_EFER_MSR) 4596 || CPUMIsGuestVmxExitCtlsSet(pCtx, VMX_EXIT_CTLS_LOAD_EFER_MSR))) 4598 4597 return true; 4599 4598 # else … … 5303 5302 if ( CPUMIsGuestInVmxRootMode(&pVCpu->cpum.GstCtx) 5304 5303 && !CPUMIsGuestInVmxNonRootMode(&pVCpu->cpum.GstCtx) 5305 && CPUMIsGuestVmxCurrentVmcsValid( pVCpu,&pVCpu->cpum.GstCtx))5304 && CPUMIsGuestVmxCurrentVmcsValid(&pVCpu->cpum.GstCtx)) 5306 5305 { 5307 5306 /* Paranoia. */ … … 5483 5482 HMVMX_CPUMCTX_ASSERT(pVCpu, CPUMCTX_EXTRN_CR0); 5484 5483 uint64_t u64GuestCr0 = pVCpu->cpum.GstCtx.cr0; 5485 uint64_t const u64ShadowCr0 = CPUMGetGuestVmxMaskedCr0( pVCpu,&pVCpu->cpum.GstCtx, pVmcsInfo->u64Cr0Mask);5484 uint64_t const u64ShadowCr0 = CPUMGetGuestVmxMaskedCr0(&pVCpu->cpum.GstCtx, pVmcsInfo->u64Cr0Mask); 5486 5485 Assert(!RT_HI_U32(u64GuestCr0)); 5487 5486 Assert(u64GuestCr0 & X86_CR0_NE); … … 5652 5651 uint64_t const u64ShadowCr4 = !pVmxTransient->fIsNestedGuest 5653 5652 ? pCtx->cr4 5654 : CPUMGetGuestVmxMaskedCr4(p VCpu, pCtx, pVmcsInfo->u64Cr4Mask);5653 : CPUMGetGuestVmxMaskedCr4(pCtx, pVmcsInfo->u64Cr4Mask); 5655 5654 Assert(!RT_HI_U32(u64GuestCr4)); 5656 5655 … … 8610 8609 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 8611 8610 if ( fIsNestedGuest 8612 && CPUMIsGuestVmxPinCtlsSet(p VCpu, pCtx, VMX_PIN_CTLS_NMI_EXIT))8611 && CPUMIsGuestVmxPinCtlsSet(pCtx, VMX_PIN_CTLS_NMI_EXIT)) 8613 8612 return IEMExecVmxVmexitXcptNmi(pVCpu); 8614 8613 #endif … … 8641 8640 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 8642 8641 if ( fIsNestedGuest 8643 && CPUMIsGuestVmxPinCtlsSet(p VCpu, pCtx, VMX_PIN_CTLS_EXT_INT_EXIT)8644 && !CPUMIsGuestVmxExitCtlsSet(p VCpu, pCtx, VMX_EXIT_CTLS_ACK_EXT_INT))8642 && CPUMIsGuestVmxPinCtlsSet(pCtx, VMX_PIN_CTLS_EXT_INT_EXIT) 8643 && !CPUMIsGuestVmxExitCtlsSet(pCtx, VMX_EXIT_CTLS_ACK_EXT_INT)) 8645 8644 { 8646 8645 VBOXSTRICTRC rcStrict = IEMExecVmxVmexitExtInt(pVCpu, 0 /* uVector */, true /* fIntPending */); … … 8655 8654 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 8656 8655 if ( fIsNestedGuest 8657 && CPUMIsGuestVmxPinCtlsSet(p VCpu, pCtx, VMX_PIN_CTLS_EXT_INT_EXIT)8658 && CPUMIsGuestVmxExitCtlsSet(p VCpu, pCtx, VMX_EXIT_CTLS_ACK_EXT_INT))8656 && CPUMIsGuestVmxPinCtlsSet(pCtx, VMX_PIN_CTLS_EXT_INT_EXIT) 8657 && CPUMIsGuestVmxExitCtlsSet(pCtx, VMX_EXIT_CTLS_ACK_EXT_INT)) 8659 8658 { 8660 8659 VBOXSTRICTRC rcStrict = IEMExecVmxVmexitExtInt(pVCpu, u8Interrupt, false /* fIntPending */); … … 16183 16182 16184 16183 PCCPUMCTX pCtx = &pVCpu->cpum.GstCtx; 16185 bool const fIntercept = CPUMIsGuestVmxXcptInterceptSet(p VCpu, pCtx, VMX_EXIT_INT_INFO_VECTOR(uExitIntInfo),16184 bool const fIntercept = CPUMIsGuestVmxXcptInterceptSet(pCtx, VMX_EXIT_INT_INFO_VECTOR(uExitIntInfo), 16186 16185 pVmxTransient->uExitIntErrorCode); 16187 16186 if (fIntercept) … … 16266 16265 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16267 16266 16268 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_INT_WINDOW_EXIT))16267 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_INT_WINDOW_EXIT)) 16269 16268 return IEMExecVmxVmexit(pVCpu, pVmxTransient->uExitReason, 0 /* uExitQual */); 16270 16269 return hmR0VmxExitIntWindow(pVCpu, pVmxTransient); … … 16279 16278 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16280 16279 16281 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_NMI_WINDOW_EXIT))16280 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_NMI_WINDOW_EXIT)) 16282 16281 return IEMExecVmxVmexit(pVCpu, pVmxTransient->uExitReason, 0 /* uExitQual */); 16283 16282 return hmR0VmxExitIntWindow(pVCpu, pVmxTransient); … … 16319 16318 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16320 16319 16321 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_HLT_EXIT))16320 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_HLT_EXIT)) 16322 16321 { 16323 16322 hmR0VmxReadExitInstrLenVmcs(pVmxTransient); … … 16335 16334 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16336 16335 16337 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_INVLPG_EXIT))16336 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_INVLPG_EXIT)) 16338 16337 { 16339 16338 hmR0VmxReadExitInstrLenVmcs(pVmxTransient); … … 16358 16357 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16359 16358 16360 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_RDPMC_EXIT))16359 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_RDPMC_EXIT)) 16361 16360 { 16362 16361 hmR0VmxReadExitInstrLenVmcs(pVmxTransient); … … 16415 16414 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16416 16415 16417 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_RDTSC_EXIT))16416 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_RDTSC_EXIT)) 16418 16417 { 16419 16418 hmR0VmxReadExitInstrLenVmcs(pVmxTransient); … … 16452 16451 case 0: 16453 16452 case 4: 16454 fIntercept = CPUMIsGuestVmxMovToCr0Cr4InterceptSet( pVCpu,&pVCpu->cpum.GstCtx, iCrReg, uNewCrX);16453 fIntercept = CPUMIsGuestVmxMovToCr0Cr4InterceptSet(&pVCpu->cpum.GstCtx, iCrReg, uNewCrX); 16455 16454 break; 16456 16455 … … 16460 16459 16461 16460 case 8: 16462 fIntercept = CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_CR8_LOAD_EXIT);16461 fIntercept = CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_CR8_LOAD_EXIT); 16463 16462 break; 16464 16463 … … 16496 16495 0, 0, 0, VMX_PROC_CTLS_CR8_STORE_EXIT }; 16497 16496 uint32_t const uIntercept = s_auCrXReadIntercepts[iCrReg]; 16498 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, uIntercept))16497 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, uIntercept)) 16499 16498 { 16500 16499 VMXVEXITINFO ExitInfo; … … 16553 16552 GCPtrEffDst = NIL_RTGCPTR; 16554 16553 16555 if (CPUMIsGuestVmxLmswInterceptSet( pVCpu,&pVCpu->cpum.GstCtx, uNewMsw))16554 if (CPUMIsGuestVmxLmswInterceptSet(&pVCpu->cpum.GstCtx, uNewMsw)) 16556 16555 { 16557 16556 VMXVEXITINFO ExitInfo; … … 16592 16591 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16593 16592 16594 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_MOV_DR_EXIT))16593 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_MOV_DR_EXIT)) 16595 16594 { 16596 16595 hmR0VmxReadExitQualVmcs(pVmxTransient); … … 16675 16674 16676 16675 uint32_t fMsrpm; 16677 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_USE_MSR_BITMAPS))16676 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_USE_MSR_BITMAPS)) 16678 16677 fMsrpm = CPUMGetVmxMsrPermission(pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pvMsrBitmap), pVCpu->cpum.GstCtx.ecx); 16679 16678 else … … 16697 16696 16698 16697 uint32_t fMsrpm; 16699 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_USE_MSR_BITMAPS))16698 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_USE_MSR_BITMAPS)) 16700 16699 fMsrpm = CPUMGetVmxMsrPermission(pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pvMsrBitmap), pVCpu->cpum.GstCtx.ecx); 16701 16700 else … … 16718 16717 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16719 16718 16720 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_MWAIT_EXIT))16719 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_MWAIT_EXIT)) 16721 16720 { 16722 16721 hmR0VmxReadExitInstrLenVmcs(pVmxTransient); … … 16752 16751 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16753 16752 16754 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_MONITOR_EXIT))16753 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_MONITOR_EXIT)) 16755 16754 { 16756 16755 hmR0VmxReadExitInstrLenVmcs(pVmxTransient); … … 16773 16772 16774 16773 /* The CPU would have already performed the necessary CPL checks for PAUSE-loop exiting. */ 16775 if ( CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_PAUSE_EXIT)16776 || CPUMIsGuestVmxProcCtls2Set( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_PAUSE_LOOP_EXIT))16774 if ( CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_PAUSE_EXIT) 16775 || CPUMIsGuestVmxProcCtls2Set(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_PAUSE_LOOP_EXIT)) 16777 16776 { 16778 16777 hmR0VmxReadExitInstrLenVmcs(pVmxTransient); … … 16791 16790 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16792 16791 16793 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_USE_TPR_SHADOW))16792 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_USE_TPR_SHADOW)) 16794 16793 { 16795 16794 hmR0VmxReadGuestPendingDbgXctps(pVmxTransient); … … 16817 16816 hmR0VmxReadExitQualVmcs(pVmxTransient); 16818 16817 16819 Assert(CPUMIsGuestVmxProcCtls2Set( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_VIRT_APIC_ACCESS));16818 Assert(CPUMIsGuestVmxProcCtls2Set(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_VIRT_APIC_ACCESS)); 16820 16819 16821 16820 Log4Func(("at offset %#x type=%u\n", VMX_EXIT_QUAL_APIC_ACCESS_OFFSET(pVmxTransient->uExitQual), … … 16844 16843 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16845 16844 16846 Assert(CPUMIsGuestVmxProcCtls2Set( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_APIC_REG_VIRT));16845 Assert(CPUMIsGuestVmxProcCtls2Set(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_APIC_REG_VIRT)); 16847 16846 hmR0VmxReadExitQualVmcs(pVmxTransient); 16848 16847 return IEMExecVmxVmexit(pVCpu, pVmxTransient->uExitReason, pVmxTransient->uExitQual); … … 16858 16857 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16859 16858 16860 Assert(CPUMIsGuestVmxProcCtls2Set( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_VIRT_INT_DELIVERY));16859 Assert(CPUMIsGuestVmxProcCtls2Set(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_VIRT_INT_DELIVERY)); 16861 16860 hmR0VmxReadExitQualVmcs(pVmxTransient); 16862 16861 return IEMExecVmxVmexit(pVCpu, pVmxTransient->uExitReason, pVmxTransient->uExitQual); … … 16871 16870 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16872 16871 16873 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_RDTSC_EXIT))16874 { 16875 Assert(CPUMIsGuestVmxProcCtls2Set( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_RDTSCP));16872 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_RDTSC_EXIT)) 16873 { 16874 Assert(CPUMIsGuestVmxProcCtls2Set(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_RDTSCP)); 16876 16875 hmR0VmxReadExitInstrLenVmcs(pVmxTransient); 16877 16876 return IEMExecVmxVmexitInstr(pVCpu, pVmxTransient->uExitReason, pVmxTransient->cbExitInstr); … … 16888 16887 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16889 16888 16890 if (CPUMIsGuestVmxProcCtls2Set( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_WBINVD_EXIT))16889 if (CPUMIsGuestVmxProcCtls2Set(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_WBINVD_EXIT)) 16891 16890 { 16892 16891 hmR0VmxReadExitInstrLenVmcs(pVmxTransient); … … 16904 16903 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16905 16904 16906 if (CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_INVLPG_EXIT))16907 { 16908 Assert(CPUMIsGuestVmxProcCtls2Set( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_INVPCID));16905 if (CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_INVLPG_EXIT)) 16906 { 16907 Assert(CPUMIsGuestVmxProcCtls2Set(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_INVPCID)); 16909 16908 hmR0VmxReadExitInstrLenVmcs(pVmxTransient); 16910 16909 hmR0VmxReadExitQualVmcs(pVmxTransient); … … 16958 16957 { 16959 16958 case VMX_EXIT_ENCLS: 16960 Assert(CPUMIsGuestVmxProcCtls2Set(p VCpu, pCtx, VMX_PROC_CTLS2_ENCLS_EXIT));16959 Assert(CPUMIsGuestVmxProcCtls2Set(pCtx, VMX_PROC_CTLS2_ENCLS_EXIT)); 16961 16960 break; 16962 16961 16963 16962 case VMX_EXIT_VMFUNC: 16964 Assert(CPUMIsGuestVmxProcCtls2Set(p VCpu, pCtx, VMX_PROC_CTLS2_VMFUNC));16963 Assert(CPUMIsGuestVmxProcCtls2Set(pCtx, VMX_PROC_CTLS2_VMFUNC)); 16965 16964 break; 16966 16965 } … … 16988 16987 case VMX_EXIT_GDTR_IDTR_ACCESS: 16989 16988 case VMX_EXIT_LDTR_TR_ACCESS: 16990 Assert(CPUMIsGuestVmxProcCtls2Set(p VCpu, pCtx, VMX_PROC_CTLS2_DESC_TABLE_EXIT));16989 Assert(CPUMIsGuestVmxProcCtls2Set(pCtx, VMX_PROC_CTLS2_DESC_TABLE_EXIT)); 16991 16990 break; 16992 16991 16993 16992 case VMX_EXIT_RDRAND: 16994 Assert(CPUMIsGuestVmxProcCtls2Set(p VCpu, pCtx, VMX_PROC_CTLS2_RDRAND_EXIT));16993 Assert(CPUMIsGuestVmxProcCtls2Set(pCtx, VMX_PROC_CTLS2_RDRAND_EXIT)); 16995 16994 break; 16996 16995 16997 16996 case VMX_EXIT_RDSEED: 16998 Assert(CPUMIsGuestVmxProcCtls2Set(p VCpu, pCtx, VMX_PROC_CTLS2_RDSEED_EXIT));16997 Assert(CPUMIsGuestVmxProcCtls2Set(pCtx, VMX_PROC_CTLS2_RDSEED_EXIT)); 16999 16998 break; 17000 16999 … … 17002 17001 case VMX_EXIT_XRSTORS: 17003 17002 /** @todo NSTVMX: Verify XSS-bitmap. */ 17004 Assert(CPUMIsGuestVmxProcCtls2Set(p VCpu, pCtx, VMX_PROC_CTLS2_XSAVES_XRSTORS));17003 Assert(CPUMIsGuestVmxProcCtls2Set(pCtx, VMX_PROC_CTLS2_XSAVES_XRSTORS)); 17005 17004 break; 17006 17005 17007 17006 case VMX_EXIT_UMWAIT: 17008 17007 case VMX_EXIT_TPAUSE: 17009 Assert(CPUMIsGuestVmxProcCtlsSet(p VCpu, pCtx, VMX_PROC_CTLS_RDTSC_EXIT));17010 Assert(CPUMIsGuestVmxProcCtls2Set(p VCpu, pCtx, VMX_PROC_CTLS2_USER_WAIT_PAUSE));17008 Assert(CPUMIsGuestVmxProcCtlsSet(pCtx, VMX_PROC_CTLS_RDTSC_EXIT)); 17009 Assert(CPUMIsGuestVmxProcCtls2Set(pCtx, VMX_PROC_CTLS2_USER_WAIT_PAUSE)); 17011 17010 break; 17012 17011 } -
trunk/src/VBox/VMM/VMMR3/EM.cpp
r81153 r81665 1500 1500 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 1501 1501 /* Handle the "external interrupt" VM-exit intercept. */ 1502 if ( CPUMIsGuestVmxPinCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PIN_CTLS_EXT_INT_EXIT)1503 && !CPUMIsGuestVmxExitCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_EXIT_CTLS_ACK_EXT_INT))1502 if ( CPUMIsGuestVmxPinCtlsSet(&pVCpu->cpum.GstCtx, VMX_PIN_CTLS_EXT_INT_EXIT) 1503 && !CPUMIsGuestVmxExitCtlsSet(&pVCpu->cpum.GstCtx, VMX_EXIT_CTLS_ACK_EXT_INT)) 1504 1504 { 1505 1505 VBOXSTRICTRC rcStrict = IEMExecVmxVmexitExtInt(pVCpu, 0 /* uVector */, true /* fIntPending */); … … 1939 1939 */ 1940 1940 if ( VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_VMX_NMI_WINDOW) 1941 && !CPUMIsGuestVmxVirtNmiBlocking( pVCpu,&pVCpu->cpum.GstCtx))1941 && !CPUMIsGuestVmxVirtNmiBlocking(&pVCpu->cpum.GstCtx)) 1942 1942 { 1943 Assert(CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_NMI_WINDOW_EXIT));1943 Assert(CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_NMI_WINDOW_EXIT)); 1944 1944 Assert(CPUMIsGuestVmxInterceptEvents(&pVCpu->cpum.GstCtx)); 1945 1945 rc2 = VBOXSTRICTRC_VAL(IEMExecVmxVmexit(pVCpu, VMX_EXIT_NMI_WINDOW, 0 /* uExitQual */)); … … 1960 1960 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 1961 1961 if ( fInVmxNonRootMode 1962 && CPUMIsGuestVmxPinCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PIN_CTLS_NMI_EXIT))1962 && CPUMIsGuestVmxPinCtlsSet(&pVCpu->cpum.GstCtx, VMX_PIN_CTLS_NMI_EXIT)) 1963 1963 { 1964 1964 rc2 = VBOXSTRICTRC_VAL(IEMExecVmxVmexitXcptNmi(pVCpu)); … … 2004 2004 */ 2005 2005 else if ( VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_VMX_INT_WINDOW) 2006 && CPUMIsGuestVmxVirtIntrEnabled( pVCpu,&pVCpu->cpum.GstCtx))2006 && CPUMIsGuestVmxVirtIntrEnabled(&pVCpu->cpum.GstCtx)) 2007 2007 { 2008 Assert(CPUMIsGuestVmxProcCtlsSet( pVCpu,&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_INT_WINDOW_EXIT));2008 Assert(CPUMIsGuestVmxProcCtlsSet(&pVCpu->cpum.GstCtx, VMX_PROC_CTLS_INT_WINDOW_EXIT)); 2009 2009 Assert(CPUMIsGuestVmxInterceptEvents(&pVCpu->cpum.GstCtx)); 2010 2010 rc2 = VBOXSTRICTRC_VAL(IEMExecVmxVmexit(pVCpu, VMX_EXIT_INT_WINDOW, 0 /* uExitQual */)); … … 2031 2031 if ( fInVmxNonRootMode 2032 2032 && VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INTERRUPT_NESTED_GUEST) 2033 && CPUMIsGuestVmxVirtIntrEnabled( pVCpu,&pVCpu->cpum.GstCtx))2033 && CPUMIsGuestVmxVirtIntrEnabled(&pVCpu->cpum.GstCtx)) 2034 2034 { 2035 2035 /** @todo NSTVMX: virtual-interrupt delivery. */ -
trunk/src/VBox/VMM/VMMR3/TRPM.cpp
r81150 r81665 379 379 if ( CPUMIsGuestInVmxNonRootMode(pCtx) 380 380 && CPUMIsGuestVmxInterceptEvents(pCtx) 381 && CPUMIsGuestVmxPinCtlsSet(p VCpu, pCtx, VMX_PIN_CTLS_EXT_INT_EXIT)382 && CPUMIsGuestVmxExitCtlsSet(p VCpu, pCtx, VMX_EXIT_CTLS_ACK_EXT_INT))381 && CPUMIsGuestVmxPinCtlsSet(pCtx, VMX_PIN_CTLS_EXT_INT_EXIT) 382 && CPUMIsGuestVmxExitCtlsSet(pCtx, VMX_EXIT_CTLS_ACK_EXT_INT)) 383 383 { 384 384 VBOXSTRICTRC rcStrict = IEMExecVmxVmexitExtInt(pVCpu, u8Interrupt, false /* fIntPending */);
Note:
See TracChangeset
for help on using the changeset viewer.