Changeset 65463 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jan 26, 2017 5:17:48 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r65454 r65463 1179 1179 cbToTryRead = PAGE_SIZE; 1180 1180 GCPtrPC = pCtx->rip; 1181 if (!IEM_IS_CANONICAL(GCPtrPC)) 1181 if (IEM_IS_CANONICAL(GCPtrPC)) 1182 cbToTryRead = PAGE_SIZE - (GCPtrPC & PAGE_OFFSET_MASK); 1183 else 1182 1184 return iemRaiseGeneralProtectionFault0(pVCpu); 1183 cbToTryRead = PAGE_SIZE - (GCPtrPC & PAGE_OFFSET_MASK);1184 1185 } 1185 1186 else … … 1187 1188 uint32_t GCPtrPC32 = pCtx->eip; 1188 1189 AssertMsg(!(GCPtrPC32 & ~(uint32_t)UINT16_MAX) || pVCpu->iem.s.enmCpuMode == IEMMODE_32BIT, ("%04x:%RX64\n", pCtx->cs.Sel, pCtx->rip)); 1189 if (GCPtrPC32 > pCtx->cs.u32Limit) 1190 if (GCPtrPC32 <= pCtx->cs.u32Limit) 1191 cbToTryRead = pCtx->cs.u32Limit - GCPtrPC32 + 1; 1192 else 1190 1193 return iemRaiseSelectorBounds(pVCpu, X86_SREG_CS, IEM_ACCESS_INSTRUCTION); 1191 cbToTryRead = pCtx->cs.u32Limit - GCPtrPC32 + 1;1192 if (!cbToTryRead)/* overflowed */1194 if (cbToTryRead) { /* likely */ } 1195 else /* overflowed */ 1193 1196 { 1194 1197 Assert(GCPtrPC32 == 0); Assert(pCtx->cs.u32Limit == UINT32_MAX); … … 1215 1218 uint64_t fFlags; 1216 1219 int rc = PGMGstGetPage(pVCpu, GCPtrPC, &fFlags, &GCPhys); 1217 if (RT_FAILURE(rc)) 1220 if (RT_SUCCESS(rc)) { /* probable */ } 1221 else 1218 1222 { 1219 1223 Log(("iemInitDecoderAndPrefetchOpcodes: %RGv - rc=%Rrc\n", GCPtrPC, rc)); 1220 1224 return iemRaisePageFault(pVCpu, GCPtrPC, IEM_ACCESS_INSTRUCTION, rc); 1221 1225 } 1222 if (!(fFlags & X86_PTE_US) && pVCpu->iem.s.uCpl == 3) 1226 if ((fFlags & X86_PTE_US) || pVCpu->iem.s.uCpl != 3) { /* likely */ } 1227 else 1223 1228 { 1224 1229 Log(("iemInitDecoderAndPrefetchOpcodes: %RGv - supervisor page\n", GCPtrPC)); 1225 1230 return iemRaisePageFault(pVCpu, GCPtrPC, IEM_ACCESS_INSTRUCTION, VERR_ACCESS_DENIED); 1226 1231 } 1227 if ((fFlags & X86_PTE_PAE_NX) && (pCtx->msrEFER & MSR_K6_EFER_NXE)) 1232 if (!(fFlags & X86_PTE_PAE_NX) || !(pCtx->msrEFER & MSR_K6_EFER_NXE)) { /* likely */ } 1233 else 1228 1234 { 1229 1235 Log(("iemInitDecoderAndPrefetchOpcodes: %RGv - NX\n", GCPtrPC));
Note:
See TracChangeset
for help on using the changeset viewer.