vbox的更動 47548 路徑 trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
- 時間撮記:
- 2013-8-6 上午03:58:21 (11 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r47429 r47548 1031 1031 /* Fetch the descriptor. */ 1032 1032 IEMSELDESC Desc; 1033 VBOXSTRICTRC rcStrict = iemMemFetchSelDesc(pIemCpu, &Desc, uSel );1033 VBOXSTRICTRC rcStrict = iemMemFetchSelDesc(pIemCpu, &Desc, uSel, X86_XCPT_GP); 1034 1034 if (rcStrict != VINF_SUCCESS) 1035 1035 return rcStrict; … … 1208 1208 /* Fetch the descriptor. */ 1209 1209 IEMSELDESC Desc; 1210 rcStrict = iemMemFetchSelDesc(pIemCpu, &Desc, uSel );1210 rcStrict = iemMemFetchSelDesc(pIemCpu, &Desc, uSel, X86_XCPT_GP); 1211 1211 if (rcStrict != VINF_SUCCESS) 1212 1212 return rcStrict; … … 1434 1434 /* Fetch the descriptor. */ 1435 1435 IEMSELDESC DescCs; 1436 rcStrict = iemMemFetchSelDesc(pIemCpu, &DescCs, uNewCs );1436 rcStrict = iemMemFetchSelDesc(pIemCpu, &DescCs, uNewCs, X86_XCPT_GP); 1437 1437 if (rcStrict != VINF_SUCCESS) 1438 1438 return rcStrict; … … 1535 1535 { 1536 1536 /* Fetch the descriptor for the new stack segment. */ 1537 rcStrict = iemMemFetchSelDesc(pIemCpu, &DescSs, uNewOuterSs );1537 rcStrict = iemMemFetchSelDesc(pIemCpu, &DescSs, uNewOuterSs, X86_XCPT_GP); 1538 1538 if (rcStrict != VINF_SUCCESS) 1539 1539 return rcStrict; … … 2012 2012 * iret throws an exception if VME isn't enabled. 2013 2013 */ 2014 if ( pCtx->eflags.Bits.u1VM 2014 if ( Efl.Bits.u1VM 2015 && Efl.Bits.u2IOPL != 3 2015 2016 && !(pCtx->cr4 & X86_CR4_VME)) 2016 2017 return iemRaiseGeneralProtectionFault0(pIemCpu); … … 2033 2034 return rcStrict; 2034 2035 uNewEip = uFrame.pu32[0]; 2036 if (uNewEip > UINT16_MAX) 2037 return iemRaiseGeneralProtectionFault0(pIemCpu); 2038 2035 2039 uNewCs = (uint16_t)uFrame.pu32[1]; 2036 2040 uNewFlags = uFrame.pu32[2]; … … 2137 2141 * @param uNewFlags The new EFLAGS. 2138 2142 * @param uNewRsp The RSP after the initial IRET frame. 2143 * 2144 * @note This can only be a 32-bit iret du to the X86_EFL_VM position. 2139 2145 */ 2140 2146 IEM_CIMPL_DEF_5(iemCImpl_iret_prot_v8086, PCPUMCTX, pCtx, uint32_t, uNewEip, uint16_t, uNewCs, … … 2179 2185 pCtx->rip = uNewEip; 2180 2186 pCtx->rsp = uNewEsp; 2181 pCtx->rflags.u = uNewFlags; 2187 uNewFlags &= X86_EFL_LIVE_MASK; 2188 uNewFlags |= X86_EFL_RA1_MASK; 2189 IEMMISC_SET_EFL(pIemCpu, pCtx, uNewFlags); 2182 2190 pIemCpu->uCpl = 3; 2183 2191 … … 2269 2277 2270 2278 IEMSELDESC DescCS; 2271 rcStrict = iemMemFetchSelDesc(pIemCpu, &DescCS, uNewCs );2279 rcStrict = iemMemFetchSelDesc(pIemCpu, &DescCS, uNewCs, X86_XCPT_GP); 2272 2280 if (rcStrict != VINF_SUCCESS) 2273 2281 { … … 2345 2353 2346 2354 IEMSELDESC DescSS; 2347 rcStrict = iemMemFetchSelDesc(pIemCpu, &DescSS, uNewSS );2355 rcStrict = iemMemFetchSelDesc(pIemCpu, &DescSS, uNewSS, X86_XCPT_GP); /** @todo Correct exception? */ 2348 2356 if (rcStrict != VINF_SUCCESS) 2349 2357 { … … 2431 2439 pCtx->ss.u64Base = X86DESC_BASE(&DescSS.Legacy); 2432 2440 2433 uint32_t fEFlagsMask = X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_ZF 2441 uint32_t fEFlagsMask = X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_ZF | X86_EFL_SF 2434 2442 | X86_EFL_TF | X86_EFL_DF | X86_EFL_OF | X86_EFL_NT; 2435 2443 if (enmEffOpSize != IEMMODE_16BIT) … … 2487 2495 X86EFLAGS NewEfl; 2488 2496 NewEfl.u = IEMMISC_GET_EFL(pIemCpu, pCtx); 2489 uint32_t fEFlagsMask = X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_ZF 2497 uint32_t fEFlagsMask = X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_ZF | X86_EFL_SF 2490 2498 | X86_EFL_TF | X86_EFL_DF | X86_EFL_OF | X86_EFL_NT; 2491 2499 if (enmEffOpSize != IEMMODE_16BIT) … … 2587 2595 2588 2596 IEMSELDESC DescCS; 2589 rcStrict = iemMemFetchSelDesc(pIemCpu, &DescCS, uNewCs );2597 rcStrict = iemMemFetchSelDesc(pIemCpu, &DescCS, uNewCs, X86_XCPT_GP); 2590 2598 if (rcStrict != VINF_SUCCESS) 2591 2599 { … … 2643 2651 else 2644 2652 { 2645 rcStrict = iemMemFetchSelDesc(pIemCpu, &DescSS, uNewSs );2653 rcStrict = iemMemFetchSelDesc(pIemCpu, &DescSS, uNewSs, X86_XCPT_GP); /** @todo Correct exception? */ 2646 2654 if (rcStrict != VINF_SUCCESS) 2647 2655 { … … 2761 2769 } 2762 2770 2763 uint32_t fEFlagsMask = X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_ZF 2771 uint32_t fEFlagsMask = X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_ZF | X86_EFL_SF 2764 2772 | X86_EFL_TF | X86_EFL_DF | X86_EFL_OF | X86_EFL_NT; 2765 2773 if (enmEffOpSize != IEMMODE_16BIT) … … 2797 2805 * Call a mode specific worker. 2798 2806 */ 2799 if ( pIemCpu->enmCpuMode == IEMMODE_16BIT 2800 && IEM_IS_REAL_OR_V86_MODE(pIemCpu)) 2807 if (IEM_IS_REAL_OR_V86_MODE(pIemCpu)) 2801 2808 return IEM_CIMPL_CALL_1(iemCImpl_iret_real_v8086, enmEffOpSize); 2802 2809 if (IEM_IS_LONG_MODE(pIemCpu)) … … 3088 3095 /* Fetch the descriptor. */ 3089 3096 IEMSELDESC Desc; 3090 VBOXSTRICTRC rcStrict = iemMemFetchSelDesc(pIemCpu, &Desc, uSel );3097 VBOXSTRICTRC rcStrict = iemMemFetchSelDesc(pIemCpu, &Desc, uSel, X86_XCPT_GP); /** @todo Correct exception? */ 3091 3098 if (rcStrict != VINF_SUCCESS) 3092 3099 return rcStrict; … … 3489 3496 */ 3490 3497 IEMSELDESC Desc; 3491 VBOXSTRICTRC rcStrict = iemMemFetchSelDesc(pIemCpu, &Desc, uNewLdt );3498 VBOXSTRICTRC rcStrict = iemMemFetchSelDesc(pIemCpu, &Desc, uNewLdt, X86_XCPT_GP); /** @todo Correct exception? */ 3492 3499 if (rcStrict != VINF_SUCCESS) 3493 3500 return rcStrict; … … 3586 3593 */ 3587 3594 IEMSELDESC Desc; 3588 VBOXSTRICTRC rcStrict = iemMemFetchSelDesc(pIemCpu, &Desc, uNewTr );3595 VBOXSTRICTRC rcStrict = iemMemFetchSelDesc(pIemCpu, &Desc, uNewTr, X86_XCPT_GP); /** @todo Correct exception? */ 3589 3596 if (rcStrict != VINF_SUCCESS) 3590 3597 return rcStrict;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器