Changeset 105098 in vbox
- Timestamp:
- Jul 2, 2024 12:46:06 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp
r105094 r105098 3451 3451 if (pVCpu->cpum.GstCtx.eflags.Bits.u1NT) 3452 3452 { 3453 Log(("iret qwith NT=1 (eflags=%#x) -> #GP(0)\n", pVCpu->cpum.GstCtx.eflags.u));3453 Log(("iret/64 with NT=1 (eflags=%#x) -> #GP(0)\n", pVCpu->cpum.GstCtx.eflags.u)); 3454 3454 return iemRaiseGeneralProtectionFault0(pVCpu); 3455 3455 } … … 3508 3508 else 3509 3509 return rcStrict; 3510 Log7(("iret qstack: cs:rip=%04x:%016RX64 rflags=%016RX64 ss:rsp=%04x:%016RX64\n", uNewCs, uNewRip, uNewFlags, uNewSs, uNewRsp));3510 Log7(("iret/64 stack: cs:rip=%04x:%016RX64 rflags=%016RX64 ss:rsp=%04x:%016RX64\n", uNewCs, uNewRip, uNewFlags, uNewSs, uNewRsp)); 3511 3511 3512 3512 /* … … 3516 3516 if (!(uNewCs & X86_SEL_MASK_OFF_RPL)) 3517 3517 { 3518 Log(("iret %04x:%016RX64/%04x:%016RX64 -> invalid CS selector, #GP(0)\n", uNewCs, uNewRip, uNewSs, uNewRsp));3518 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 -> invalid CS selector, #GP(0)\n", uNewCs, uNewRip, uNewSs, uNewRsp)); 3519 3519 return iemRaiseGeneralProtectionFault0(pVCpu); 3520 3520 } … … 3524 3524 if (rcStrict != VINF_SUCCESS) 3525 3525 { 3526 Log(("iret %04x:%016RX64/%04x:%016RX64 - rcStrict=%Rrc when fetching CS\n",3526 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 - rcStrict=%Rrc when fetching CS\n", 3527 3527 uNewCs, uNewRip, uNewSs, uNewRsp, VBOXSTRICTRC_VAL(rcStrict))); 3528 3528 return rcStrict; … … 3533 3533 || !(DescCS.Legacy.Gen.u4Type & X86_SEL_TYPE_CODE)) 3534 3534 { 3535 Log(("iret %04x:%016RX64/%04x:%016RX64 - CS is not a code segment T=%u T=%#xu -> #GP\n",3535 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 - CS is not a code segment T=%u T=%#xu -> #GP\n", 3536 3536 uNewCs, uNewRip, uNewSs, uNewRsp, DescCS.Legacy.Gen.u1DescType, DescCS.Legacy.Gen.u4Type)); 3537 3537 return iemRaiseGeneralProtectionFaultBySelector(pVCpu, uNewCs); … … 3544 3544 if ((uNewCs & X86_SEL_RPL) != DescCS.Legacy.Gen.u2Dpl) 3545 3545 { 3546 Log(("iret %04x:%016RX64 - RPL != DPL (%d) -> #GP\n", uNewCs, uNewRip, DescCS.Legacy.Gen.u2Dpl));3546 Log(("iret/64 %04x:%016RX64 - RPL != DPL (%d) -> #GP\n", uNewCs, uNewRip, DescCS.Legacy.Gen.u2Dpl)); 3547 3547 return iemRaiseGeneralProtectionFaultBySelector(pVCpu, uNewCs); 3548 3548 } … … 3550 3550 else if ((uNewCs & X86_SEL_RPL) < DescCS.Legacy.Gen.u2Dpl) 3551 3551 { 3552 Log(("iret %04x:%016RX64 - RPL < DPL (%d) -> #GP\n", uNewCs, uNewRip, DescCS.Legacy.Gen.u2Dpl));3552 Log(("iret/64 %04x:%016RX64 - RPL < DPL (%d) -> #GP\n", uNewCs, uNewRip, DescCS.Legacy.Gen.u2Dpl)); 3553 3553 return iemRaiseGeneralProtectionFaultBySelector(pVCpu, uNewCs); 3554 3554 } 3555 3555 if ((uNewCs & X86_SEL_RPL) < IEM_GET_CPL(pVCpu)) 3556 3556 { 3557 Log(("iret %04x:%016RX64 - RPL < CPL (%d) -> #GP\n", uNewCs, uNewRip, IEM_GET_CPL(pVCpu)));3557 Log(("iret/64 %04x:%016RX64 - RPL < CPL (%d) -> #GP\n", uNewCs, uNewRip, IEM_GET_CPL(pVCpu))); 3558 3558 return iemRaiseGeneralProtectionFaultBySelector(pVCpu, uNewCs); 3559 3559 } … … 3562 3562 if (!DescCS.Legacy.Gen.u1Present) 3563 3563 { 3564 Log(("iret %04x:%016RX64/%04x:%016RX64 - CS not present -> #NP\n", uNewCs, uNewRip, uNewSs, uNewRsp));3564 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 - CS not present -> #NP\n", uNewCs, uNewRip, uNewSs, uNewRsp)); 3565 3565 return iemRaiseSelectorNotPresentBySelector(pVCpu, uNewCs); 3566 3566 } … … 3576 3576 || uNewCpl > 2) /** @todo verify SS=0 impossible for ring-3. */ 3577 3577 { 3578 Log(("iret %04x:%016RX64/%04x:%016RX64 -> invalid SS selector, #GP(0)\n", uNewCs, uNewRip, uNewSs, uNewRsp));3578 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 -> invalid SS selector, #GP(0)\n", uNewCs, uNewRip, uNewSs, uNewRsp)); 3579 3579 return iemRaiseGeneralProtectionFault0(pVCpu); 3580 3580 } … … 3587 3587 if (rcStrict != VINF_SUCCESS) 3588 3588 { 3589 Log(("iret %04x:%016RX64/%04x:%016RX64 - %Rrc when fetching SS\n",3589 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 - %Rrc when fetching SS\n", 3590 3590 uNewCs, uNewRip, uNewSs, uNewRsp, VBOXSTRICTRC_VAL(rcStrict))); 3591 3591 return rcStrict; … … 3596 3596 if ((uNewSs & X86_SEL_RPL) != (uNewCs & X86_SEL_RPL)) 3597 3597 { 3598 Log(("iret %04x:%016RX64/%04x:%016RX64 -> SS.RPL != CS.RPL -> #GP\n", uNewCs, uNewRip, uNewSs, uNewRsp));3598 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 -> SS.RPL != CS.RPL -> #GP\n", uNewCs, uNewRip, uNewSs, uNewRsp)); 3599 3599 return iemRaiseGeneralProtectionFaultBySelector(pVCpu, uNewSs); 3600 3600 } … … 3607 3607 if (DescSS.Legacy.Gen.u2Dpl != (uNewCs & X86_SEL_RPL)) 3608 3608 { 3609 Log(("iret %04x:%016RX64/%04x:%016RX64 -> SS.DPL (%d) != CS.RPL -> #GP\n",3609 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 -> SS.DPL (%d) != CS.RPL -> #GP\n", 3610 3610 uNewCs, uNewRip, uNewSs, uNewRsp, DescSS.Legacy.Gen.u2Dpl)); 3611 3611 return iemRaiseGeneralProtectionFaultBySelector(pVCpu, uNewSs); … … 3615 3615 if (!DescSS.Legacy.Gen.u1DescType) 3616 3616 { 3617 Log(("iret %04x:%016RX64/%04x:%016RX64 -> SS is system segment (%#x) -> #GP\n",3617 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 -> SS is system segment (%#x) -> #GP\n", 3618 3618 uNewCs, uNewRip, uNewSs, uNewRsp, DescSS.Legacy.Gen.u4Type)); 3619 3619 return iemRaiseGeneralProtectionFaultBySelector(pVCpu, uNewSs); … … 3621 3621 if ((DescSS.Legacy.Gen.u4Type & (X86_SEL_TYPE_CODE | X86_SEL_TYPE_WRITE)) != X86_SEL_TYPE_WRITE) 3622 3622 { 3623 Log(("iret %04x:%016RX64/%04x:%016RX64 - not writable data segment (%#x) -> #GP\n",3623 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 - not writable data segment (%#x) -> #GP\n", 3624 3624 uNewCs, uNewRip, uNewSs, uNewRsp, DescSS.Legacy.Gen.u4Type)); 3625 3625 return iemRaiseGeneralProtectionFaultBySelector(pVCpu, uNewSs); … … 3629 3629 if (!DescSS.Legacy.Gen.u1Present) 3630 3630 { 3631 Log(("iret %04x:%016RX64/%04x:%016RX64 -> SS not present -> #SS\n", uNewCs, uNewRip, uNewSs, uNewRsp));3631 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 -> SS not present -> #SS\n", uNewCs, uNewRip, uNewSs, uNewRsp)); 3632 3632 return iemRaiseStackSelectorNotPresentBySelector(pVCpu, uNewSs); 3633 3633 } … … 3640 3640 if (!IEM_IS_CANONICAL(uNewRip)) 3641 3641 { 3642 Log(("iret %04x:%016RX64/%04x:%016RX64 -> RIP is not canonical -> #GP(0)\n", 3643 uNewCs, uNewRip, uNewSs, uNewRsp)); 3642 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 -> RIP is not canonical -> #GP(0)\n", uNewCs, uNewRip, uNewSs, uNewRsp)); 3644 3643 return iemRaiseNotCanonical(pVCpu); 3645 3644 } … … 3649 3648 else 3650 3649 { 3651 Log(("iret %04x:%016RX64/%04x:%016RX64 -> both L and D are set -> #GP(0)\n", uNewCs, uNewRip, uNewSs, uNewRsp));3650 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 -> both L and D are set -> #GP(0)\n", uNewCs, uNewRip, uNewSs, uNewRsp)); 3652 3651 return iemRaiseGeneralProtectionFault0(pVCpu); 3653 3652 } … … 3657 3656 if (uNewRip > cbLimitCS) 3658 3657 { 3659 Log(("iret %04x:%016RX64/%04x:%016RX64 -> EIP is out of bounds (%#x) -> #GP(0)\n",3658 Log(("iret/64 %04x:%016RX64/%04x:%016RX64 -> EIP is out of bounds (%#x) -> #GP(0)\n", 3660 3659 uNewCs, uNewRip, uNewSs, uNewRsp, cbLimitCS)); 3661 3660 /** @todo Which is it, \#GP(0) or \#GP(sel)? */ … … 3696 3695 fEFlagsNew |= uNewFlags & fEFlagsMask; 3697 3696 #ifdef DBGFTRACE_ENABLED 3698 RTTraceBufAddMsgF(pVCpu->CTX_SUFF(pVM)->CTX_SUFF(hTraceBuf), "iret/ %ul%u %08llx -> %04x:%04llx %llx %04x:%04llx",3697 RTTraceBufAddMsgF(pVCpu->CTX_SUFF(pVM)->CTX_SUFF(hTraceBuf), "iret/64/%ul%u %08llx -> %04x:%04llx %llx %04x:%04llx", 3699 3698 IEM_GET_CPL(pVCpu), uNewCpl, pVCpu->cpum.GstCtx.rip, uNewCs, uNewRip, uNewFlags, uNewSs, uNewRsp); 3700 3699 #endif … … 3720 3719 pVCpu->cpum.GstCtx.ss.u32Limit = UINT32_MAX; 3721 3720 pVCpu->cpum.GstCtx.ss.u64Base = 0; 3722 Log2(("iret qnew SS: NULL\n"));3721 Log2(("iret/64 new SS: NULL\n")); 3723 3722 } 3724 3723 else … … 3728 3727 pVCpu->cpum.GstCtx.ss.u32Limit = cbLimitSs; 3729 3728 pVCpu->cpum.GstCtx.ss.u64Base = X86DESC_BASE(&DescSS.Legacy); 3730 Log2(("iret qnew SS: base=%#RX64 lim=%#x attr=%#x\n", pVCpu->cpum.GstCtx.ss.u64Base, pVCpu->cpum.GstCtx.ss.u32Limit, pVCpu->cpum.GstCtx.ss.Attr.u));3729 Log2(("iret/64 new SS: base=%#RX64 lim=%#x attr=%#x\n", pVCpu->cpum.GstCtx.ss.u64Base, pVCpu->cpum.GstCtx.ss.u32Limit, pVCpu->cpum.GstCtx.ss.Attr.u)); 3731 3730 } 3732 3731
Note:
See TracChangeset
for help on using the changeset viewer.