VirtualBox

Changeset 23300 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 24, 2009 4:47:59 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
52793
Message:

Cut addresses according to the cpu mode.

File:
1 edited

Legend:

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

    r22890 r23300  
    6969    }
    7070
    71     return (RTGCPTR)((RTGCUINTPTR)Addr + X86DESC_BASE(Desc));
     71    return (RTGCPTR)(((RTGCUINTPTR)Addr + X86DESC_BASE(Desc)) & 0xffffffff);
    7272}
    7373#endif /* !IN_RING0 */
     
    331331        /* calc address assuming straight stuff. */
    332332        pvFlat = (RTGCPTR)((RTGCUINTPTR)Addr + X86DESC_BASE(Desc));
     333
     334        /* Cut the address to 32 bits. */
     335        Assert(!CPUMIsGuestInLongMode(pVCpu))
     336        pvFlat &= 0xffffffff;
    333337
    334338        u1Present     = Desc.Gen.u1Present;
     
    538542        /* calc address assuming straight stuff. */
    539543        pvFlat = (RTGCPTR)((RTGCUINTPTR)Addr + X86DESC_BASE(Desc));
     544
     545        /* Cut the address to 32 bits. */
     546        Assert(!CPUMIsGuestInLongMode(pVCpu))
     547        pvFlat &= 0xffffffff;
    540548
    541549        u1Present     = Desc.Gen.u1Present;
     
    737745                {
    738746                    *ppvFlat = (RTGCPTR)((RTGCUINTPTR)Addr + X86DESC_BASE(Desc));
     747                    /* Cut the address to 32 bits. */
     748                    Assert(!CPUMIsGuestInLongMode(pVCpu))
     749                    *ppvFlat &= 0xffffffff;
     750
    739751                    if (pcBits)
    740752                        *pcBits = Desc.Gen.u1DefBig ? 32 : 16; /** @todo GUEST64 */
Note: See TracChangeset for help on using the changeset viewer.

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