VirtualBox

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


Ignore:
Timestamp:
Dec 2, 2021 5:34:56 PM (3 years ago)
Author:
vboxsync
Message:

VMM: More driverless mode adjustments. bugref:10138

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

Legend:

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

    r91895 r92713  
    161161{
    162162    AssertPtr(pQueue);
    163     Assert(pQueue->pVMR3 && pQueue->pVMR0);
     163    Assert(pQueue->pVMR3);
    164164#ifdef IN_RING0
     165    AssertPtr(pQueue->pVMR0);
    165166    return pQueue;
    166167#else
     168    Assert(pQueue->pVMR0 || SUPR3IsDriverless());
    167169    return MMHyperCCToR0(pQueue->CTX_SUFF(pVM), pQueue);
    168170#endif
  • trunk/src/VBox/VMM/VMMR3/GVMMR3.cpp

    r92703 r92713  
    9090        /* CPUs: */
    9191        PVMCPU pVCpu = (PVMCPU)((uintptr_t)pVM + sizeof(VM) + PAGE_SIZE);
    92         for (VMCPUID idxCpu = 0; idxCpu < cCpus; idxCpu++, pVCpu++)
     92        for (VMCPUID idxCpu = 0; idxCpu < cCpus; idxCpu++)
    9393        {
    9494            pVM->apCpusR3[idxCpu] = pVCpu;
  • trunk/src/VBox/VMM/VMMR3/VMM.cpp

    r92493 r92713  
    275275     * Register the Ring-0 VM handle with the session for fast ioctl calls.
    276276     */
    277     rc = SUPR3SetVMForFastIOCtl(VMCC_GET_VMR0_FOR_CALL(pVM));
    278     if (RT_FAILURE(rc))
    279         return rc;
     277    bool const fDriverless = SUPR3IsDriverless();
     278    if (!fDriverless)
     279    {
     280        rc = SUPR3SetVMForFastIOCtl(VMCC_GET_VMR0_FOR_CALL(pVM));
     281        if (RT_FAILURE(rc))
     282            return rc;
     283    }
    280284
    281285#ifdef VBOX_WITH_NMI
     
    291295         * Start the log flusher thread.
    292296         */
    293         rc = RTThreadCreate(&pVM->vmm.s.hLogFlusherThread, vmmR3LogFlusher, pVM, 0 /*cbStack*/,
    294                             RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "R0LogWrk");
     297        if (!fDriverless)
     298            rc = RTThreadCreate(&pVM->vmm.s.hLogFlusherThread, vmmR3LogFlusher, pVM, 0 /*cbStack*/,
     299                                RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "R0LogWrk");
    295300        if (RT_SUCCESS(rc))
    296301        {
     
    320325{
    321326    RT_NOREF_PV(pVM);
     327
     328    /* Nothing to do here in driverless mode. */
     329    if (SUPR3IsDriverless())
     330        return;
    322331
    323332    /*
     
    453462
    454463    /*
     464     * Nothing to do here in driverless mode.
     465     */
     466    if (SUPR3IsDriverless())
     467        return VINF_SUCCESS;
     468
     469    /*
    455470     * Make sure the ring-0 loggers are up to date.
    456471     */
     
    558573             * knowledge/information from HM initialization.
    559574             */
     575/** @todo r=bird: This shouldn't be done from here, but rather from VM.cpp. There is no dependency on VMM here. */
    560576            rc = GIMR3InitCompleted(pVM);
    561577            AssertRCReturn(rc, rc);
     
    590606     * Call Ring-0 entry with termination code.
    591607     */
    592 #ifdef NO_SUPCALLR0VMM
    593     //rc = VERR_GENERAL_FAILURE;
    594608    int rc = VINF_SUCCESS;
    595 #else
    596     int rc = SUPR3CallVMMR0Ex(VMCC_GET_VMR0_FOR_CALL(pVM), 0 /*idCpu*/, VMMR0_DO_VMMR0_TERM, 0, NULL);
    597 #endif
     609    if (!SUPR3IsDriverless())
     610    {
     611#ifndef NO_SUPCALLR0VMM
     612        rc = SUPR3CallVMMR0Ex(VMCC_GET_VMR0_FOR_CALL(pVM), 0 /*idCpu*/, VMMR0_DO_VMMR0_TERM, 0, NULL);
     613#endif
     614    }
    598615
    599616    /*
     
    723740VMMR3_INT_DECL(int) VMMR3UpdateLoggers(PVM pVM)
    724741{
    725     VM_ASSERT_EMT(pVM);
     742    /* Nothing to do here if we're in driverless mode: */
     743    if (SUPR3IsDriverless())
     744        return VINF_SUCCESS;
     745
    726746    PVMCPU pVCpu = VMMGetCpu(pVM);
    727747    AssertReturn(pVCpu, VERR_VM_THREAD_NOT_EMT);
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