VirtualBox

Changeset 1160 in vbox for trunk


Ignore:
Timestamp:
Mar 2, 2007 2:37:51 PM (18 years ago)
Author:
vboxsync
Message:

Correction for v86 mode

Location:
trunk/src/VBox/VMM/VMMGC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMGC/IOMGC.cpp

    r23 r1160  
    564564
    565565        /* Access verification first; we can't recover from traps inside this instruction, as the port read cannot be repeated. */
     566        uint32_t cpl = (pRegFrame->eflags.Bits.u1VM) ? 3 : (pRegFrame->ss & X86_SEL_RPL);
    566567        rc = PGMVerifyAccess(pVM, (RTGCUINTPTR)GCPtrDst, cTransfers * cbSize,
    567                              X86_PTE_RW | (((pRegFrame->ss & X86_SEL_RPL) == 3) ? X86_PTE_US : 0));
     568                             X86_PTE_RW | ((cpl == 3) ? X86_PTE_US : 0));
    568569        if (rc != VINF_SUCCESS)
    569570        {
     
    668669
    669670        /* Access verification first; we currently can't recover properly from traps inside this instruction */
     671        uint32_t cpl = (pRegFrame->eflags.Bits.u1VM) ? 3 : (pRegFrame->ss & X86_SEL_RPL);
    670672        rc = PGMVerifyAccess(pVM, (RTGCUINTPTR)GCPtrSrc, cTransfers * cbSize,
    671                              ((pRegFrame->ss & X86_SEL_RPL) == 3) ? X86_PTE_US : 0);
     673                             (cpl == 3) ? X86_PTE_US : 0);
    672674        if (rc != VINF_SUCCESS)
    673675        {
  • trunk/src/VBox/VMM/VMMGC/TRPMGCHandlers.cpp

    r1134 r1160  
    311311     * Both PATM are using INT3s, let them have a go first.
    312312     */
    313     if ((pRegFrame->ss & X86_SEL_RPL) == 1)
     313    if (    (pRegFrame->ss & X86_SEL_RPL) == 1
     314        &&  !pRegFrame->eflags.Bits.u1VM)
    314315    {
    315316        rc = PATMHandleInt3PatchTrap(pVM, pRegFrame);
     
    341342
    342343    if (    (pRegFrame->ss & X86_SEL_RPL) == 1
     344        &&  !pRegFrame->eflags.Bits.u1VM
    343345        &&  PATMIsPatchGCAddr(pVM, (RTGCPTR)pRegFrame->eip))
    344346    {
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