VirtualBox

Changeset 32898 in vbox


Ignore:
Timestamp:
Oct 5, 2010 9:43:39 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
66381
Message:

Main: Drop the lock before triggering VMMDev/EMT activity during a CPU hotplug event

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r32885 r32898  
    18411841    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    18421842
    1843     /** @todo r=klaus holding the lock while triggering VMMDev/EMT activity is
    1844      * asking for deadlocks. Code MUST drop any lock before touching VMMDev. */
    18451843    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    18461844
     
    18681866                        tr("CPU %d is not attached"), aCpu);
    18691867
     1868    /* Leave the lock before any EMT/VMMDev call. */
     1869    alock.leave();
     1870
    18701871    /* Check if the CPU is unlocked */
    18711872    PPDMIBASE pBase;
     
    19131914        /*
    19141915         * Call worker in EMT, that's faster and safer than doing everything
    1915          * using VMR3ReqCall. Note that we separate VMR3ReqCall from VMR3ReqWait
    1916          * here to make requests from under the lock in order to serialize them.
     1916         * using VMR3ReqCall.
    19171917         */
    19181918        PVMREQ pReq;
     
    19211921                          this, aCpu);
    19221922
    1923         /* leave the lock before a VMR3* call (EMT will call us back)! */
    1924         alock.leave();
    1925 
    19261923        if (vrc == VERR_TIMEOUT || RT_SUCCESS(vrc))
    19271924        {
     
    19991996    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    20001997
    2001     /** @todo r=klaus holding the lock while triggering VMMDev/EMT activity is
    2002      * asking for deadlocks. Code MUST drop any lock before touching VMMDev. */
    20031998    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    20041999
     
    38803875    AssertComRCReturnRC(autoCaller.rc());
    38813876
    3882     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    3883 
    38843877    HRESULT rc = S_OK;
    38853878
     
    38873880    if (mpVM)
    38883881    {
    3889         /* protect mpVM */
    3890         AutoVMCaller autoVMCaller(this);
    3891         if (FAILED(autoVMCaller.rc())) return autoVMCaller.rc();
    3892 
    38933882        if (aRemove)
    38943883            rc = doCPURemove(aCPU);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette