Changeset 78455 in vbox for trunk/src/VBox
- Timestamp:
- May 9, 2019 8:36:06 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 130464
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r78453 r78455 3031 3031 3032 3032 /** 3033 * Checks whether an I/O instruction for the given port is intercepted (causes a3034 * VM-exit) or not.3035 *3036 * @returns @c true if the instruction is intercepted, @c false otherwise.3037 * @param pVCpu The cross context virtual CPU structure.3038 * @param u16Port The I/O port being accessed by the instruction.3039 * @param cbAccess The size of the I/O access in bytes (1, 2 or 4 bytes).3040 */3041 IEM_STATIC bool iemVmxIsIoInterceptSet(PCVMCPU pVCpu, uint16_t u16Port, uint8_t cbAccess)3042 {3043 PCVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs);3044 Assert(pVmcs);3045 3046 /*3047 * Check whether the I/O instruction must cause a VM-exit or not.3048 * See Intel spec. 25.1.3 "Instructions That Cause VM Exits Conditionally".3049 */3050 if (pVmcs->u32ProcCtls & VMX_PROC_CTLS_UNCOND_IO_EXIT)3051 return true;3052 3053 if (pVmcs->u32ProcCtls & VMX_PROC_CTLS_USE_IO_BITMAPS)3054 {3055 uint8_t const *pbIoBitmapA = (uint8_t const *)pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pvIoBitmap);3056 uint8_t const *pbIoBitmapB = (uint8_t const *)pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pvIoBitmap) + VMX_V_IO_BITMAP_A_SIZE;3057 Assert(pbIoBitmapA);3058 Assert(pbIoBitmapB);3059 return CPUMGetVmxIoBitmapPermission(pbIoBitmapA, pbIoBitmapB, u16Port, cbAccess);3060 }3061 3062 return false;3063 }3064 3065 3066 /**3067 3033 * VMX VM-exit handler for VM-exits due to INVLPG. 3068 3034 * … … 3535 3501 Assert(cbAccess == 1 || cbAccess == 2 || cbAccess == 4); 3536 3502 3537 bool const fIntercept = iemVmxIsIoInterceptSet(pVCpu, u16Port, cbAccess);3503 bool const fIntercept = CPUMIsGuestVmxIoInterceptSet(pVCpu, u16Port, cbAccess); 3538 3504 if (fIntercept) 3539 3505 { … … 3577 3543 Assert(uInstrId != VMXINSTRID_IO_INS || ExitInstrInfo.StrIo.iSegReg == X86_SREG_ES); 3578 3544 3579 bool const fIntercept = iemVmxIsIoInterceptSet(pVCpu, u16Port, cbAccess);3545 bool const fIntercept = CPUMIsGuestVmxIoInterceptSet(pVCpu, u16Port, cbAccess); 3580 3546 if (fIntercept) 3581 3547 {
Note:
See TracChangeset
for help on using the changeset viewer.