Changeset 79316 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jun 25, 2019 6:28:07 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131534
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r79202 r79316 3587 3587 * @param uExitReason The VM-exit reason (VMX_EXIT_VMREAD or 3588 3588 * VMX_EXIT_VMREAD). 3589 * @param u64 FieldEnc The VMCS field encoding.3590 */ 3591 VMM_INT_DECL(bool) CPUMIsGuestVmxVmreadVmwriteInterceptSet(PCVMCPU pVCpu, uint32_t uExitReason, uint64_t u64 FieldEnc)3589 * @param u64VmcsField The VMCS field. 3590 */ 3591 VMM_INT_DECL(bool) CPUMIsGuestVmxVmreadVmwriteInterceptSet(PCVMCPU pVCpu, uint32_t uExitReason, uint64_t u64VmcsField) 3592 3592 { 3593 3593 #ifndef IN_RC … … 3599 3599 * Without VMCS shadowing, all VMREAD and VMWRITE instructions are intercepted. 3600 3600 */ 3601 if (! pVCpu->CTX_SUFF(pVM)->cpum.s.GuestFeatures.fVmxVmcsShadowing)3601 if (!CPUMIsGuestVmxProcCtls2Set(pVCpu, &pVCpu->cpum.s.Guest, VMX_PROC_CTLS2_VMCS_SHADOWING)) 3602 3602 return true; 3603 3603 … … 3607 3607 * encoding (i.e. bit 12). 3608 3608 */ 3609 if (u64 FieldEnc& VMX_VMCSFIELD_RSVD_MASK)3609 if (u64VmcsField & VMX_VMCSFIELD_RSVD_MASK) 3610 3610 return true; 3611 3611 … … 3613 3613 * Finally, consult the VMREAD/VMWRITE bitmap whether to intercept the instruction or not. 3614 3614 */ 3615 uint32_t const u32FieldEnc = RT_LO_U32(u64FieldEnc); 3616 Assert(u32FieldEnc >> 3 < VMX_V_VMREAD_VMWRITE_BITMAP_SIZE); 3617 Assert(pVCpu->cpum.s.Guest.hwvirt.vmx.CTX_SUFF(pvVmreadBitmap)); 3615 uint32_t const u32VmcsField = RT_LO_U32(u64VmcsField); 3618 3616 uint8_t const *pbBitmap = uExitReason == VMX_EXIT_VMREAD 3619 3617 ? (uint8_t const *)pVCpu->cpum.s.Guest.hwvirt.vmx.CTX_SUFF(pvVmreadBitmap) 3620 3618 : (uint8_t const *)pVCpu->cpum.s.Guest.hwvirt.vmx.CTX_SUFF(pvVmwriteBitmap); 3621 3619 Assert(pbBitmap); 3622 pbBitmap += (u32FieldEnc >> 3); 3623 if (*pbBitmap & RT_BIT(u32FieldEnc & 7)) 3620 Assert(u32VmcsField >> 3 < VMX_V_VMREAD_VMWRITE_BITMAP_SIZE); 3621 pbBitmap += (u32VmcsField >> 3); 3622 if (*pbBitmap & RT_BIT(u32VmcsField & 7)) 3624 3623 return true; 3625 3624 3626 3625 return false; 3627 3628 3626 #else 3629 RT_NOREF3(pVCpu, uExitReason, u64 FieldEnc);3627 RT_NOREF3(pVCpu, uExitReason, u64VmcsField); 3630 3628 return false; 3631 3629 #endif
Note:
See TracChangeset
for help on using the changeset viewer.