VirtualBox

Changeset 23145 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Sep 18, 2009 8:58:30 PM (15 years ago)
Author:
vboxsync
Message:

VMM: Extended VMMR3EmtRendezvous with TYPE_ASCENDING, TYPE_DESCENDING and STOP_ON_ERROR for use with VM state changes. The return type of the callback was changed so that the callback can feed scheduling info to EM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm.h

    r21645 r23145  
    129129 * Rendezvous callback.
    130130 *
    131  * @returns VBox status code.
     131 * @returns VBox strict status code - EM scheduling.  Do not return
     132 *          informational status code other than the ones used by EM for
     133 *          scheduling.
     134 *
    132135 * @param   pVM         The VM handle.
    133136 * @param   pVCpu       The handle of the calling virtual CPU.
    134137 * @param   pvUser      The user argument.
    135138 */
    136 typedef DECLCALLBACK(int) FNVMMEMTRENDEZVOUS(PVM pVM, PVMCPU pVCpu, void *pvUser);
     139typedef DECLCALLBACK(VBOXSTRICTRC) FNVMMEMTRENDEZVOUS(PVM pVM, PVMCPU pVCpu, void *pvUser);
    137140/** Pointer to a rendezvous callback function. */
    138141typedef FNVMMEMTRENDEZVOUS *PFNVMMEMTRENDEZVOUS;
     
    199202 *  @{ */
    200203/** Execution type mask. */
    201 #define VMMEMTRENDEZVOUS_FLAGS_TYPE_MASK        UINT32_C(0x00000003)
     204#define VMMEMTRENDEZVOUS_FLAGS_TYPE_MASK            UINT32_C(0x00000007)
    202205/** Invalid execution type. */
    203 #define VMMEMTRENDEZVOUS_FLAGS_TYPE_INVALID     UINT32_C(0)
     206#define VMMEMTRENDEZVOUS_FLAGS_TYPE_INVALID         UINT32_C(0)
    204207/** Let the EMTs execute the callback one by one (in no particular order). */
    205 #define VMMEMTRENDEZVOUS_FLAGS_TYPE_ONE_BY_ONE  UINT32_C(1)
     208#define VMMEMTRENDEZVOUS_FLAGS_TYPE_ONE_BY_ONE      UINT32_C(1)
    206209/** Let all the EMTs execute the callback at the same time. */
    207 #define VMMEMTRENDEZVOUS_FLAGS_TYPE_ALL_AT_ONCE UINT32_C(2)
     210#define VMMEMTRENDEZVOUS_FLAGS_TYPE_ALL_AT_ONCE     UINT32_C(2)
    208211/** Only execute the callback on one EMT (no particular one). */
    209 #define VMMEMTRENDEZVOUS_FLAGS_TYPE_ONCE        UINT32_C(3)
     212#define VMMEMTRENDEZVOUS_FLAGS_TYPE_ONCE            UINT32_C(3)
     213/** Let the EMTs execute the callback one by one in ascending order. */
     214#define VMMEMTRENDEZVOUS_FLAGS_TYPE_ASCENDING       UINT32_C(4)
     215/** Let the EMTs execute the callback one by one in descending order. */
     216#define VMMEMTRENDEZVOUS_FLAGS_TYPE_DESCENDING      UINT32_C(5)
     217/** Stop after the first error.
     218 * This is not valid for any execution type where more than one EMT is active
     219 * at a time. */
     220#define VMMEMTRENDEZVOUS_FLAGS_STOP_ON_ERROR        UINT32_C(0x00000008)
    210221/** The valid flags. */
    211 #define VMMEMTRENDEZVOUS_FLAGS_VALID_MASK       VMMEMTRENDEZVOUS_FLAGS_TYPE_MASK
    212 /** @} */
    213 VMMR3DECL(void)     VMMR3EmtRendezvousFF(PVM pVM, PVMCPU pVCpu);
     222#define VMMEMTRENDEZVOUS_FLAGS_VALID_MASK           UINT32_C(0x0000000f)
     223/** @} */
     224VMMR3DECL(int)      VMMR3EmtRendezvousFF(PVM pVM, PVMCPU pVCpu);
    214225VMMR3DECL(int)      VMMR3ReadR0Stack(PVM pVM, VMCPUID idCpu, RTHCUINTPTR pAddress, void *pvBuf, size_t cbRead);
    215226/** @} */
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