VirtualBox

Changeset 97333 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Oct 28, 2022 2:16:35 PM (2 years ago)
Author:
vboxsync
Message:

VMM/IEM: Disable two incorrect assertions about EIP when fetching opcode bytes in 16-bit mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r97289 r97333  
    765765        {
    766766            GCPtrFirst = pVCpu->cpum.GstCtx.eip + (offBuf - (uint32_t)(int32_t)pVCpu->iem.s.offCurInstrStart);
    767             Assert(!(GCPtrFirst & ~(uint32_t)UINT16_MAX) || pVCpu->iem.s.enmCpuMode == IEMMODE_32BIT);
     767            /* Assert(!(GCPtrFirst & ~(uint32_t)UINT16_MAX) || pVCpu->iem.s.enmCpuMode == IEMMODE_32BIT); - this is allowed */
    768768            if (RT_LIKELY((uint32_t)GCPtrFirst <= pVCpu->cpum.GstCtx.cs.u32Limit))
    769769            { /* likely */ }
    770             else
     770            else /** @todo For CPUs older than the 386, we should not generate #GP here but wrap around! */
    771771                iemRaiseSelectorBoundsJmp(pVCpu, X86_SREG_CS, IEM_ACCESS_INSTRUCTION);
    772772            cbMaxRead = pVCpu->cpum.GstCtx.cs.u32Limit - (uint32_t)GCPtrFirst + 1;
     
    10021002    {
    10031003        uint32_t GCPtrNext32 = pVCpu->cpum.GstCtx.eip;
    1004         Assert(!(GCPtrNext32 & ~(uint32_t)UINT16_MAX) || pVCpu->iem.s.enmCpuMode == IEMMODE_32BIT);
     1004        /* Assert(!(GCPtrNext32 & ~(uint32_t)UINT16_MAX) || pVCpu->iem.s.enmCpuMode == IEMMODE_32BIT); - this is allowed */
    10051005        GCPtrNext32 += pVCpu->iem.s.cbOpcode;
    10061006        if (GCPtrNext32 > pVCpu->cpum.GstCtx.cs.u32Limit)
     1007            /** @todo For CPUs older than the 386, we should not generate #GP here but wrap around! */
    10071008            return iemRaiseSelectorBounds(pVCpu, X86_SREG_CS, IEM_ACCESS_INSTRUCTION);
    10081009        cbToTryRead = pVCpu->cpum.GstCtx.cs.u32Limit - GCPtrNext32 + 1;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette