VirtualBox

Ignore:
Timestamp:
Apr 2, 2013 8:17:11 AM (12 years ago)
Author:
vboxsync
Message:

Ring-1 compression patches, courtesy of trivirt AG:

  • main: diff to remove the hwvirt requirement for QNX
  • rem: diff for dealing with raw ring 0/1 selectors and general changes to allowed guest execution states
  • vmm: changes for using the guest's TSS selector index as our hypervisor TSS selector (makes str safe) (VBOX_WITH_SAFE_STR )
  • vmm: changes for dealing with guest ring 1 code (VBOX_WITH_RAW_RING1)
  • vmm: change to emulate smsw in RC/R0 (QNX uses this old style instruction a lot so going to qemu for emulation is very expensive)
  • vmm: change (hack) to kick out patm virtual handlers in case they conflict with guest GDT/TSS write monitors; we should allow multiple handlers per page, but that change would be rather invasive
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/VBoxRecompiler.c

    r44528 r45276  
    13711371         */
    13721372        case EXCP_EXECUTE_RAW:
    1373             Log2(("REMR3Run: cpu_exec -> EXCP_EXECUTE_RAW\n"));
     1373            Log2(("REMR3Run: cpu_exec -> EXCP_EXECUTE_RAW pc=%RGv\n", pVM->rem.s.Env.eip));
    13741374            rc = VINF_EM_RESCHEDULE_RAW;
    13751375            break;
     
    16331633        }
    16341634
     1635# ifdef VBOX_WITH_RAW_RING1
     1636        /* Only ring 0 and 1 supervisor code. */
     1637        if (EMIsRawRing1Enabled(env->pVM))
     1638        {
     1639            if (((fFlags >> HF_CPL_SHIFT) & 3) == 2)   /* ring 1 code is moved into ring 2, so we can't support ring-2 in that case. */
     1640            {
     1641                Log2(("raw r0 mode refused: CPL %d\n", (fFlags >> HF_CPL_SHIFT) & 3));
     1642                return false;
     1643            }
     1644        }
     1645        else
     1646# endif
    16351647        // Only R0
    16361648        if (((fFlags >> HF_CPL_SHIFT) & 3) != 0)
     
    16651677#endif
    16661678
     1679#ifndef VBOX_WITH_RAW_RING1
     1680        if (((env->eflags >> IOPL_SHIFT) & 3) != 0)
     1681        {
     1682            Log2(("raw r0 mode refused: IOPL %d\n", ((env->eflags >> IOPL_SHIFT) & 3)));
     1683            return false;
     1684        }
     1685#endif
    16671686        env->state |= CPU_RAW_RING0;
    16681687    }
     
    17641783    if (pVM->rem.s.fIgnoreInvlPg || pVM->rem.s.cIgnoreAll)
    17651784        return;
    1766     Log(("remR3FlushPage: GCPtr=%RGv\n", GCPtr));
     1785    LogFlow(("remR3FlushPage: GCPtr=%RGv\n", GCPtr));
    17671786    Assert(pVM->rem.s.fInREM || pVM->rem.s.fInStateSync);
    17681787
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