Changeset 100059 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Jun 3, 2023 12:17:25 AM (20 months ago)
- Location:
- trunk/src/VBox/VMM/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMInline.h
r100052 r100059 406 406 Assert(CPUMSELREG_ARE_HIDDEN_PARTS_VALID(pVCpu, &pVCpu->cpum.GstCtx.tr)); 407 407 408 pVCpu->iem.s.fExec = iemCalcExecFlags(pVCpu) | fExecOpts; 408 pVCpu->iem.s.rcPassUp = VINF_SUCCESS; 409 pVCpu->iem.s.fExec = iemCalcExecFlags(pVCpu) | fExecOpts; 410 pVCpu->iem.s.cActiveMappings = 0; 411 pVCpu->iem.s.iNextMapping = 0; 412 409 413 # ifdef VBOX_STRICT 410 414 pVCpu->iem.s.enmDefAddrMode = (IEMMODE)0xfe; … … 435 439 # endif 436 440 # endif /* VBOX_STRICT */ 437 438 pVCpu->iem.s.cActiveMappings = 0;439 pVCpu->iem.s.iNextMapping = 0;440 pVCpu->iem.s.rcPassUp = VINF_SUCCESS;441 441 } 442 442 # endif /* VBOX_INCLUDED_vmm_dbgf_h */ -
trunk/src/VBox/VMM/include/IEMInternal.h
r100052 r100059 559 559 * 32-bit mode (for simplifying most memory accesses). */ 560 560 #define IEM_F_MODE_X86_FLAT_OR_PRE_386_MASK UINT32_C(0x00000004) 561 /** X86 Mode: Bit indicating protected mode . */561 /** X86 Mode: Bit indicating protected mode, real mode (or SMM) when not set. */ 562 562 #define IEM_F_MODE_X86_PROT_MASK UINT32_C(0x00000008) 563 563 /** X86 Mode: Bit used to indicate virtual 8086 mode (only 16-bit). */ … … 3682 3682 * @param a_pVCpu The cross context virtual CPU structure of the calling thread. 3683 3683 */ 3684 #define IEM_IS_REAL_OR_V86_MODE(a_pVCpu) (CPUMIsGuestInRealOrV86ModeEx(IEM_GET_CTX(a_pVCpu))) 3684 #define IEM_IS_REAL_OR_V86_MODE(a_pVCpu) (( ((a_pVCpu)->iem.s.fExec ^ IEM_F_MODE_X86_PROT_MASK) \ 3685 & (IEM_F_MODE_X86_V86_MASK | IEM_F_MODE_X86_PROT_MASK)) != 0) 3685 3686 3686 3687 /** … … 3690 3691 * @param a_pVCpu The cross context virtual CPU structure of the calling thread. 3691 3692 */ 3692 #define IEM_IS_V86_MODE(a_pVCpu) ( CPUMIsGuestInV86ModeEx(IEM_GET_CTX(a_pVCpu)))3693 #define IEM_IS_V86_MODE(a_pVCpu) (((a_pVCpu)->iem.s.fExec & IEM_F_MODE_X86_V86_MASK) != 0) 3693 3694 3694 3695 /** … … 3730 3731 * @param a_pVCpu The cross context virtual CPU structure of the calling thread. 3731 3732 */ 3732 #define IEM_IS_REAL_MODE(a_pVCpu) ( CPUMIsGuestInRealModeEx(IEM_GET_CTX(a_pVCpu)))3733 #define IEM_IS_REAL_MODE(a_pVCpu) (!((a_pVCpu)->iem.s.fExec & IEM_F_MODE_X86_PROT_MASK)) 3733 3734 3734 3735 /** … … 3845 3846 * Check if the guest has entered VMX non-root operation. 3846 3847 */ 3847 # define IEM_VMX_IS_NON_ROOT_MODE(a_pVCpu) (CPUMIsGuestInVmxNonRootMode(IEM_GET_CTX(a_pVCpu))) 3848 # define IEM_VMX_IS_NON_ROOT_MODE(a_pVCpu) ( ((a_pVCpu)->iem.s.fExec & (IEM_F_X86_CTX_VMX | IEM_F_X86_CTX_IN_GUEST)) \ 3849 == (IEM_F_X86_CTX_VMX | IEM_F_X86_CTX_IN_GUEST) ) 3848 3850 3849 3851 /** 3850 3852 * Check if the nested-guest has the given Pin-based VM-execution control set. 3851 3853 */ 3852 # define IEM_VMX_IS_PINCTLS_SET(a_pVCpu, a_PinCtl) \ 3853 (CPUMIsGuestVmxPinCtlsSet(IEM_GET_CTX(a_pVCpu), (a_PinCtl))) 3854 # define IEM_VMX_IS_PINCTLS_SET(a_pVCpu, a_PinCtl) (CPUMIsGuestVmxPinCtlsSet(IEM_GET_CTX(a_pVCpu), (a_PinCtl))) 3854 3855 3855 3856 /** 3856 3857 * Check if the nested-guest has the given Processor-based VM-execution control set. 3857 3858 */ 3858 # define IEM_VMX_IS_PROCCTLS_SET(a_pVCpu, a_ProcCtl) \ 3859 (CPUMIsGuestVmxProcCtlsSet(IEM_GET_CTX(a_pVCpu), (a_ProcCtl))) 3859 # define IEM_VMX_IS_PROCCTLS_SET(a_pVCpu, a_ProcCtl) (CPUMIsGuestVmxProcCtlsSet(IEM_GET_CTX(a_pVCpu), (a_ProcCtl))) 3860 3860 3861 3861 /** … … 3863 3863 * control set. 3864 3864 */ 3865 # define IEM_VMX_IS_PROCCTLS2_SET(a_pVCpu, a_ProcCtl2) \ 3866 (CPUMIsGuestVmxProcCtls2Set(IEM_GET_CTX(a_pVCpu), (a_ProcCtl2))) 3865 # define IEM_VMX_IS_PROCCTLS2_SET(a_pVCpu, a_ProcCtl2) (CPUMIsGuestVmxProcCtls2Set(IEM_GET_CTX(a_pVCpu), (a_ProcCtl2))) 3867 3866 3868 3867 /** Gets the guest-physical address of the shadows VMCS for the given VCPU. */ … … 3950 3949 #ifdef VBOX_WITH_NESTED_HWVIRT_SVM 3951 3950 /** 3951 * Checks if we're executing a guest using AMD-V. 3952 */ 3953 # define IEM_SVM_IS_IN_GUEST(a_pVCpu) ( (a_pVCpu->iem.s.fExec & (IEM_F_X86_CTX_SVM | IEM_F_X86_CTX_IN_GUEST)) \ 3954 == (IEM_F_X86_CTX_SVM | IEM_F_X86_CTX_IN_GUEST)) 3955 /** 3952 3956 * Check if an SVM control/instruction intercept is set. 3953 3957 */ 3954 3958 # define IEM_SVM_IS_CTRL_INTERCEPT_SET(a_pVCpu, a_Intercept) \ 3955 ( CPUMIsGuestSvmCtrlInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_Intercept)))3959 (IEM_SVM_IS_IN_GUEST(a_pVCpu) && CPUMIsGuestSvmCtrlInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_Intercept))) 3956 3960 3957 3961 /** … … 3959 3963 */ 3960 3964 # define IEM_SVM_IS_READ_CR_INTERCEPT_SET(a_pVCpu, a_uCr) \ 3961 ( CPUMIsGuestSvmReadCRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uCr)))3965 (IEM_SVM_IS_IN_GUEST(a_pVCpu) && CPUMIsGuestSvmReadCRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uCr))) 3962 3966 3963 3967 /** … … 3965 3969 */ 3966 3970 # define IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(a_pVCpu, a_uCr) \ 3967 ( CPUMIsGuestSvmWriteCRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uCr)))3971 (IEM_SVM_IS_IN_GUEST(a_pVCpu) && CPUMIsGuestSvmWriteCRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uCr))) 3968 3972 3969 3973 /** … … 3971 3975 */ 3972 3976 # define IEM_SVM_IS_READ_DR_INTERCEPT_SET(a_pVCpu, a_uDr) \ 3973 ( CPUMIsGuestSvmReadDRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uDr)))3977 (IEM_SVM_IS_IN_GUEST(a_pVCpu) && CPUMIsGuestSvmReadDRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uDr))) 3974 3978 3975 3979 /** … … 3977 3981 */ 3978 3982 # define IEM_SVM_IS_WRITE_DR_INTERCEPT_SET(a_pVCpu, a_uDr) \ 3979 ( CPUMIsGuestSvmWriteDRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uDr)))3983 (IEM_SVM_IS_IN_GUEST(a_pVCpu) && CPUMIsGuestSvmWriteDRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uDr))) 3980 3984 3981 3985 /** … … 3983 3987 */ 3984 3988 # define IEM_SVM_IS_XCPT_INTERCEPT_SET(a_pVCpu, a_uVector) \ 3985 ( CPUMIsGuestSvmXcptInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uVector)))3989 (IEM_SVM_IS_IN_GUEST(a_pVCpu) && CPUMIsGuestSvmXcptInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uVector))) 3986 3990 3987 3991 /**
Note:
See TracChangeset
for help on using the changeset viewer.