VirtualBox

Changeset 4932 in vbox


Ignore:
Timestamp:
Sep 20, 2007 2:12:41 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
24680
Message:

Always use the ioctl path for hwaccm code execution.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

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

    r4917 r4932  
    19571957            rc = VERR_GENERAL_FAILURE;
    19581958#else
    1959             //rc = SUPCallVMMR0Ex(pVM->pVMR0, VMMR0_DO_HWACC_RUN, NULL, 0);
    1960 # if !defined(RT_OS_LINUX) /* Alternative for debugging - currently untested on linux. */
    19611959            rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_HWACC_RUN);
    1962 # else
    1963             rc = SUPCallVMMR0(pVM->pVMR0, VMMR0_DO_HWACC_RUN, NULL);
    1964 # endif
    19651960#endif
    19661961        } while (rc == VINF_EM_RAW_INTERRUPT_HYPER);
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r4790 r4932  
    10361036    /* All done! Let's start VM execution. */
    10371037    STAM_PROFILE_ADV_START(&pVM->hwaccm.s.StatInGC, x);
    1038     Assert(!(ASMGetFlags() & X86_EFL_IF));
    10391038    if (pVM->hwaccm.s.vmx.fResumeVM == false)
    10401039        rc = VMXStartVM(pCtx);
    10411040    else
    10421041        rc = VMXResumeVM(pCtx);
    1043     Assert(!(ASMGetFlags() & X86_EFL_IF));
    10441042
    10451043    /* In case we execute a goto ResumeExecution later on. */
     
    19581956        return rc;
    19591957    }
    1960     Assert(!(ASMGetFlags() & X86_EFL_IF));
    19611958    pVM->hwaccm.s.vmx.fResumeVM = false;
    19621959    return VINF_SUCCESS;
     
    19741971    Assert(pVM->hwaccm.s.vmx.fSupported);
    19751972
    1976     Assert(!(ASMGetFlags() & X86_EFL_IF));
    1977 
    19781973    /* Clear VM Control Structure. Marking it inactive, clearing implementation specific data and writing back VMCS data to memory. */
    19791974    int rc = VMXClearVMCS(pVM->hwaccm.s.vmx.pVMCSPhys);
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r4929 r4932  
    489489
    490490        /*
    491          * Run guest code using the available hardware acceleration technology.
    492          */
    493         case VMMR0_DO_HWACC_RUN:
    494         {
    495             STAM_COUNTER_INC(&pVM->vmm.s.StatRunGC);
    496             int rc = HWACCMR0Enable(pVM);
    497             if (VBOX_SUCCESS(rc))
    498             {
    499 #ifdef DEBUG_NO_RING0_ASSERTIONS
    500                 g_pVMAssert = pVM;
    501 #endif
    502                 rc = vmmR0CallHostSetJmp(&pVM->vmm.s.CallHostR0JmpBuf, HWACCMR0RunGuestCode, pVM); /* this may resume code. */
    503 #ifdef DEBUG_NO_RING0_ASSERTIONS
    504                 g_pVMAssert = 0;
    505 #endif
    506                 int rc2 = HWACCMR0Disable(pVM);
    507                 AssertRC(rc2);
    508             }
    509             pVM->vmm.s.iLastGCRc = rc;
    510 
    511 #ifdef VBOX_WITH_STATISTICS
    512             vmmR0RecordRC(pVM, rc);
    513 #endif
    514             /* No special action required for external interrupts, just return. */
    515             return rc;
    516         }
    517 
    518         /*
    519491         * Initialize the R0 part of a VM instance.
    520492         */
     
    534506            RTCCUINTREG fFlags = ASMIntDisableFlags();
    535507            int rc = VMMR0Term(pVM);
    536             ASMSetFlags(fFlags);
    537             return rc;
    538         }
    539 
    540         /*
    541          * Setup the hardware accelerated raw-mode session.
    542          */
    543         case VMMR0_DO_HWACC_SETUP_VM:
    544         {
    545             RTCCUINTREG fFlags = ASMIntDisableFlags();
    546             int rc = HWACCMR0SetupVMX(pVM);
    547508            ASMSetFlags(fFlags);
    548509            return rc;
     
    679640    switch (enmOperation)
    680641    {
    681 #if 1 /* disable later? */
    682         /*
    683          * Alternative to the fast path, all we need to do is disable interrupts.
    684          */
    685         case VMMR0_DO_RAW_RUN:
    686         case VMMR0_DO_HWACC_RUN:
    687         {
    688             RTCCUINTREG fFlags = ASMIntDisableFlags();
    689             int rc = VMMR0EntryFast(pVM, enmOperation);
    690             ASMSetFlags(fFlags);
    691             return rc;
    692         }
    693 #endif
    694 
    695642        /*
    696643         * Initialize the R0 part of a VM instance.
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