- Timestamp:
- Jun 19, 2022 8:37:16 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r94868 r95307 6090 6090 { 6091 6091 /* 6092 * Check the input and figure out which mapping entry to use. 6092 * Check the input, check segment access and adjust address 6093 * with segment base. 6093 6094 */ 6094 6095 Assert(cbMem <= 64 || cbMem == 512 || cbMem == 108 || cbMem == 104 || cbMem == 94); /* 512 is the max! */ … … 6096 6097 Assert(pVCpu->iem.s.cActiveMappings < RT_ELEMENTS(pVCpu->iem.s.aMemMappings)); 6097 6098 6099 VBOXSTRICTRC rcStrict = iemMemApplySegment(pVCpu, fAccess, iSegReg, cbMem, &GCPtrMem); 6100 if (rcStrict == VINF_SUCCESS) { /*likely*/ } 6101 else longjmp(*pVCpu->iem.s.CTX_SUFF(pJmpBuf), VBOXSTRICTRC_VAL(rcStrict)); 6102 6103 /* 6104 * Figure out which mapping entry to use. 6105 */ 6098 6106 unsigned iMemMap = pVCpu->iem.s.iNextMapping; 6099 6107 if ( iMemMap >= RT_ELEMENTS(pVCpu->iem.s.aMemMappings) … … 6109 6117 6110 6118 /* 6111 * Map the memory, checking that we can actually access it. If something 6112 * slightly complicated happens, fall back on bounce buffering. 6119 * Crossing a page boundary? 6113 6120 */ 6114 VBOXSTRICTRC rcStrict = iemMemApplySegment(pVCpu, fAccess, iSegReg, cbMem, &GCPtrMem);6115 if (rcStrict == VINF_SUCCESS) { /*likely*/ }6116 else longjmp(*pVCpu->iem.s.CTX_SUFF(pJmpBuf), VBOXSTRICTRC_VAL(rcStrict));6117 6118 /* Crossing a page boundary? */6119 6121 if ((GCPtrMem & GUEST_PAGE_OFFSET_MASK) + cbMem <= GUEST_PAGE_SIZE) 6120 6122 { /* No (likely). */ } … … 6583 6585 * @param GCPtrMem The address of the guest memory. 6584 6586 */ 6585 staticuint32_t iemMemFetchDataU32SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT6587 uint32_t iemMemFetchDataU32SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT 6586 6588 { 6587 6589 uint32_t const *pu32Src = (uint32_t const *)iemMemMapJmp(pVCpu, sizeof(*pu32Src), iSegReg, GCPtrMem, IEM_ACCESS_DATA_R); … … 6652 6654 outdated page pointer, or other troubles. */ 6653 6655 Log10(("iemMemFetchDataU32Jmp: %u:%RGv fallback\n", iSegReg, GCPtrMem)); 6656 return iemMemFetchDataU32SafeJmp(pVCpu, iSegReg, GCPtrMem); 6657 6658 # else 6659 uint32_t const *pu32Src = (uint32_t const *)iemMemMapJmp(pVCpu, sizeof(*pu32Src), iSegReg, GCPtrMem, IEM_ACCESS_DATA_R); 6660 uint32_t const u32Ret = *pu32Src; 6661 iemMemCommitAndUnmapJmp(pVCpu, (void *)pu32Src, IEM_ACCESS_DATA_R); 6662 return u32Ret; 6654 6663 # endif 6655 return iemMemFetchDataU32SafeJmp(pVCpu, iSegReg, GCPtrMem);6656 6664 } 6657 6665 #endif
Note:
See TracChangeset
for help on using the changeset viewer.