VirtualBox

Changeset 13755 in vbox for trunk/src/VBox/VMM/VMReq.cpp


Ignore:
Timestamp:
Nov 3, 2008 3:49:06 PM (16 years ago)
Author:
vboxsync
Message:

Started with VM request API changes.

File:
1 edited

Legend:

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

    r12989 r13755  
    6161 *
    6262 * @param   pVM             The VM handle.
     63 * @param   enmDest         Destination of the request packet (global or per VCPU).
    6364 * @param   ppReq           Where to store the pointer to the request.
    6465 *                          This will be NULL or a valid request pointer not matter what happends.
     
    7172 * @param   ...             Function arguments.
    7273 */
    73 VMMR3DECL(int) VMR3ReqCall(PVM pVM, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
     74VMMR3DECL(int) VMR3ReqCall(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
    7475{
    7576    va_list va;
    7677    va_start(va, cArgs);
    77     int rc = VMR3ReqCallVU(pVM->pUVM, ppReq, cMillies, VMREQFLAGS_VBOX_STATUS, pfnFunction, cArgs, va);
     78    int rc = VMR3ReqCallVU(pVM->pUVM, enmDest, ppReq, cMillies, VMREQFLAGS_VBOX_STATUS, pfnFunction, cArgs, va);
    7879    va_end(va);
    7980    return rc;
     
    9495 *
    9596 * @param   pUVM            Pointer to the user mode VM structure.
     97 * @param   enmDest         Destination of the request packet (global or per VCPU).
    9698 * @param   ppReq           Where to store the pointer to the request.
    9799 *                          This will be NULL or a valid request pointer not matter what happends.
     
    104106 * @param   ...             Function arguments.
    105107 */
    106 VMMR3DECL(int) VMR3ReqCallVoidU(PUVM pUVM, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
     108VMMR3DECL(int) VMR3ReqCallVoidU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
    107109{
    108110    va_list va;
    109111    va_start(va, cArgs);
    110     int rc = VMR3ReqCallVU(pUVM, ppReq, cMillies, VMREQFLAGS_VOID, pfnFunction, cArgs, va);
     112    int rc = VMR3ReqCallVU(pUVM, enmDest, ppReq, cMillies, VMREQFLAGS_VOID, pfnFunction, cArgs, va);
    111113    va_end(va);
    112114    return rc;
     
    127129 *
    128130 * @param   pVM             The VM handle.
     131 * @param   enmDest         Destination of the request packet (global or per VCPU).
    129132 * @param   ppReq           Where to store the pointer to the request.
    130133 *                          This will be NULL or a valid request pointer not matter what happends.
     
    137140 * @param   ...             Function arguments.
    138141 */
    139 VMMR3DECL(int) VMR3ReqCallVoid(PVM pVM, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
     142VMMR3DECL(int) VMR3ReqCallVoid(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
    140143{
    141144    va_list va;
    142145    va_start(va, cArgs);
    143     int rc = VMR3ReqCallVU(pVM->pUVM, ppReq, cMillies, VMREQFLAGS_VOID, pfnFunction, cArgs, va);
     146    int rc = VMR3ReqCallVU(pVM->pUVM, enmDest, ppReq, cMillies, VMREQFLAGS_VOID, pfnFunction, cArgs, va);
    144147    va_end(va);
    145148    return rc;
     
    160163 *
    161164 * @param   pVM             The VM handle.
     165 * @param   enmDest         Destination of the request packet (global or per VCPU).
    162166 * @param   ppReq           Where to store the pointer to the request.
    163167 *                          This will be NULL or a valid request pointer not matter what happends, unless fFlags
     
    172176 * @param   ...             Function arguments.
    173177 */
    174 VMMR3DECL(int) VMR3ReqCallEx(PVM pVM, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)
     178VMMR3DECL(int) VMR3ReqCallEx(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)
    175179{
    176180    va_list va;
    177181    va_start(va, cArgs);
    178     int rc = VMR3ReqCallVU(pVM->pUVM, ppReq, cMillies, fFlags, pfnFunction, cArgs, va);
     182    int rc = VMR3ReqCallVU(pVM->pUVM, enmDest, ppReq, cMillies, fFlags, pfnFunction, cArgs, va);
    179183    va_end(va);
    180184    return rc;
     
    195199 *
    196200 * @param   pUVM            Pointer to the user mode VM structure.
     201 * @param   enmDest         Destination of the request packet (global or per VCPU).
    197202 * @param   ppReq           Where to store the pointer to the request.
    198203 *                          This will be NULL or a valid request pointer not matter what happends, unless fFlags
     
    207212 * @param   ...             Function arguments.
    208213 */
    209 VMMR3DECL(int) VMR3ReqCallU(PUVM pUVM, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)
     214VMMR3DECL(int) VMR3ReqCallU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)
    210215{
    211216    va_list va;
    212217    va_start(va, cArgs);
    213     int rc = VMR3ReqCallVU(pUVM, ppReq, cMillies, fFlags, pfnFunction, cArgs, va);
     218    int rc = VMR3ReqCallVU(pUVM, enmDest, ppReq, cMillies, fFlags, pfnFunction, cArgs, va);
    214219    va_end(va);
    215220    return rc;
     
    230235 *
    231236 * @param   pUVM            Pointer to the user mode VM structure.
     237 * @param   enmDest         Destination of the request packet (global or per VCPU).
    232238 * @param   ppReq           Where to store the pointer to the request.
    233239 *                          This will be NULL or a valid request pointer not matter what happends, unless fFlags
     
    242248 * @param   Args            Argument vector.
    243249 */
    244 VMMR3DECL(int) VMR3ReqCallVU(PUVM pUVM, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args)
     250VMMR3DECL(int) VMR3ReqCallVU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args)
    245251{
    246252    LogFlow(("VMR3ReqCallV: cMillies=%d fFlags=%#x pfnFunction=%p cArgs=%d\n", cMillies, fFlags, pfnFunction, cArgs));
     
    265271     * Allocate request
    266272     */
    267     int rc = VMR3ReqAllocU(pUVM, &pReq, VMREQTYPE_INTERNAL);
     273    int rc = VMR3ReqAllocU(pUVM, &pReq, VMREQTYPE_INTERNAL, enmDest);
    268274    if (VBOX_FAILURE(rc))
    269275        return rc;
     
    364370 * @param   ppReq           Where to store the pointer to the allocated packet.
    365371 * @param   enmType         Package type.
    366  */
    367 VMMR3DECL(int) VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType)
    368 {
    369     return VMR3ReqAllocU(pVM->pUVM, ppReq, enmType);
     372 * @param   enmDest         Destination of the request packet (global or per VCPU).
     373 */
     374VMMR3DECL(int) VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VMREQDEST enmDest)
     375{
     376    return VMR3ReqAllocU(pVM->pUVM, ppReq, enmType, enmDest);
    370377}
    371378
     
    382389 * @param   ppReq           Where to store the pointer to the allocated packet.
    383390 * @param   enmType         Package type.
    384  */
    385 VMMR3DECL(int) VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType)
     391 * @param   enmDest         Destination of the request packet (global or per VCPU).
     392 */
     393VMMR3DECL(int) VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMREQDEST enmDest)
    386394{
    387395    /*
     
    463471            pReq->fFlags   = VMREQFLAGS_VBOX_STATUS;
    464472            pReq->enmType  = enmType;
     473            pReq->enmDest  = enmDest;
    465474
    466475            *ppReq = pReq;
     
    499508    pReq->fFlags   = VMREQFLAGS_VBOX_STATUS;
    500509    pReq->enmType  = enmType;
     510    pReq->enmDest  = enmDest;
    501511
    502512    *ppReq = pReq;
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