VirtualBox

Changeset 100398 in vbox


Ignore:
Timestamp:
Jul 6, 2023 8:40:28 AM (17 months ago)
Author:
vboxsync
Message:

Devices/Network/DevVirtioNet: Some fixes, the control queue can't be destroyed if not used because the UEFI firmware can access the device as well and have a different opinion on how to use it than any guest OS accessing it later and requiring the control queue. Also the thread would need to be destroyed before the SUP event smeaphore because the thread is woken up before using said semaphore, bugref:10459

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevVirtioNet.cpp

    r100371 r100398  
    10771077    {
    10781078        Log10((" and its worker"));
     1079        rc = PDMDevHlpThreadDestroy(pVirtio->pDevInsR3,  pWorkerR3->pThread, &rcThread);
     1080        AssertRCReturn(rc, rc);
     1081        pWorkerR3->pThread = 0;
     1082
    10791083        rc = PDMDevHlpSUPSemEventClose(pVirtio->pDevInsR3, pWorker->hEvtProcess);
    10801084        AssertRCReturn(rc, rc);
    10811085        pWorker->hEvtProcess = 0;
    1082         rc = PDMDevHlpThreadDestroy(pVirtio->pDevInsR3,  pWorkerR3->pThread, &rcThread);
    1083         AssertRCReturn(rc, rc);
    1084         pWorkerR3->pThread = 0;
     1086
    10851087        pVirtq->fHasWorker = false;
    10861088    }
     
    32413243    virtioNetR3SetVirtqNames(pThis, fLegacy);
    32423244
     3245    /** @todo r=aeichner We can't just destroy the control queue here because the UEFI firmware and the guest OS might have different
     3246     * opinions on how to use the device and if the UEFI firmware causes the control queue to be destroyed Linux guests
     3247     * will have a hard time using it. */
     3248#if 0
    32433249    /* Senseless for modern guest to use control queue in this case. (See Note 1 in PDM-invoked device constructor) */
    32443250    if (!fLegacy && !(fDriverFeatures & VIRTIONET_F_CTRL_VQ))
    32453251        virtioNetR3VirtqDestroy(pVirtio, &pThis->aVirtqs[CTRLQIDX]);
     3252#else
     3253    RT_NOREF(fDriverFeatures);
     3254#endif
    32463255}
    32473256
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