VirtualBox

Changeset 19179 in vbox


Ignore:
Timestamp:
Apr 24, 2009 6:32:02 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46491
Message:

VMReq.cpp: VMREQDEST values other than ANY doesn't work yet, patch it up for now so we can prepare the user code without crashing or loosing requests.

File:
1 edited

Legend:

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

    r19146 r19179  
    614614                    VERR_VM_REQUEST_INVALID_TYPE);
    615615
     616/** @todo SMP: Temporary hack until the unicast and broadcast cases has been
     617 *        implemented correctly below. It asserts + hangs now. */
     618if (pReq->enmDest != VMREQDEST_ANY)
     619    pReq->enmDest = VMREQDEST_ANY;
     620
     621
    616622    /*
    617623     * Are we the EMT or not?
     
    620626    int     rc      = VINF_SUCCESS;
    621627    PUVM    pUVM    = ((VMREQ volatile *)pReq)->pUVM;                 /* volatile paranoia */
    622     PUVMCPU pUVMCPU = (PUVMCPU)RTTlsGet(pUVM->vm.s.idxTLS);
     628    PUVMCPU pUVCpu = (PUVMCPU)RTTlsGet(pUVM->vm.s.idxTLS);
    623629
    624630    if (pReq->enmDest == VMREQDEST_BROADCAST)
     
    630636            PVMCPU pVCpu = &pUVM->pVM->aCpus[i];
    631637
    632             if (   !pUVMCPU
    633                 ||  pUVMCPU->idCpu != i)
     638            if (   !pUVCpu
     639                ||  pUVCpu->idCpu != i)
    634640            {
    635641                /*
     
    671677        } /* for each VMCPU */
    672678    }
    673     else
    674     if (    pReq->enmDest  != VMREQDEST_ANY  /* for a specific VMCPU? */
    675         &&  pUVMCPU->idCpu != (unsigned)pReq->enmDest)
    676     {
    677         RTCPUID  idTarget = (RTCPUID)pReq->enmDest;
     679    else if (   pReq->enmDest != VMREQDEST_ANY  /* for a specific VMCPU? */
     680             && (   !pUVCpu /* not an EMT */
     681                 || pUVCpu->idCpu != (unsigned)pReq->enmDest))
     682    {
     683        RTCPUID  idTarget = (RTCPUID)pReq->enmDest;     Assert(idTarget < pUVM->cCpus);
    678684        PVMCPU   pVCpu = &pUVM->pVM->aCpus[idTarget];
    679685        unsigned fFlags = ((VMREQ volatile *)pReq)->fFlags;     /* volatile paranoia */
     
    707713    }
    708714    else if (    pReq->enmDest == VMREQDEST_ANY
    709              &&  !pUVMCPU /* only EMT threads have a valid pointer stored in the TLS slot. */)
     715             &&  !pUVCpu /* only EMT threads have a valid pointer stored in the TLS slot. */)
    710716    {
    711717        unsigned fFlags = ((VMREQ volatile *)pReq)->fFlags;     /* volatile paranoia */
     
    738744    else
    739745    {
    740         Assert(pUVMCPU);
     746        Assert(pUVCpu);
    741747
    742748        /*
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