VirtualBox

Changeset 75853 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Nov 30, 2018 7:26:42 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
127057
Message:

GuestControl,HGCM,VBoxService: Save/restore related optimizations and changes. bugref:9313

Location:
trunk/include/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/HostServices/GuestControlSvc.h

    r75824 r75853  
    322322     * uint64_t is ~8U).
    323323     *
     324     * Does also support the VM restore checking as in GUEST_MSG_PEEK_WAIT (64-bit
     325     * param \# 0), see documentation there.
     326     *
    324327     * @retval  VINF_SUCCESS if a message was pending and is being returned.
    325328     * @retval  VERR_TRY_AGAIN if no message pending.
     329     * @retval  VERR_VM_RESTORED if first parameter is a non-zero 64-bit value that
     330     *          does not match VbglR3GetSessionId() any more.  The new value is
     331     *          returned.
    326332     * @retval  VERR_INVALID_CLIENT_ID
    327333     * @retval  VERR_WRONG_PARAMETER_COUNT
     
    338344     * uint64_t is ~8U).
    339345     *
     346     * To facilitate VM restore checking, the first parameter can be a 64-bit
     347     * integer holding the VbglR3GetSessionId() value the guest knowns.  The
     348     * function will then check this before going to sleep and return
     349     * VERR_VM_RESTORED if it doesn't match, same thing happens when the VM is
     350     * restored.
     351     *
    340352     * @retval  VINF_SUCCESS if info about an pending message is being returned.
    341353     * @retval  VINF_TRY_AGAIN and message set to HOST_CANCEL_PENDING_WAITS if
    342354     *          cancelled by GUEST_MSG_CANCEL.
    343355     * @retval  VERR_RESOURCE_BUSY if another thread already made a waiting call.
     356     * @retval  VERR_VM_RESTORED if first parameter is a non-zero 64-bit value that
     357     *          does not match VbglR3GetSessionId() any more.  The new value is
     358     *          returned.
    344359     * @retval  VERR_INVALID_CLIENT_ID
    345360     * @retval  VERR_WRONG_PARAMETER_COUNT
  • trunk/include/VBox/VBoxGuestLib.h

    r75824 r75853  
    773773VBGLR3DECL(int) VbglR3GuestCtrlMsgSkip(uint32_t idClient, int rcSkip, uint32_t idMsg);
    774774VBGLR3DECL(int) VbglR3GuestCtrlMsgSkipOld(uint32_t uClientId);
    775 VBGLR3DECL(int) VbglR3GuestCtrlMsgPeekWait(uint32_t idClient, uint32_t *pidMsg, uint32_t *pcParameters);
     775VBGLR3DECL(int) VbglR3GuestCtrlMsgPeekWait(uint32_t idClient, uint32_t *pidMsg, uint32_t *pcParameters, uint64_t *pidRestoreCheck);
    776776VBGLR3DECL(int) VbglR3GuestCtrlCancelPendingWaits(HGCMCLIENTID idClient);
    777777/* Guest session handling. */
  • trunk/include/VBox/err.h

    r75454 r75853  
    9393/** Essential fields in the shared VM structure doesn't match the global one. */
    9494#define VERR_INCONSISTENT_VM_HANDLE         (-1024)
     95/** The VM has been restored. */
     96#define VERR_VM_RESTORED                    (-1025)
    9597/** @} */
    9698
  • trunk/include/VBox/hgcmsvc.h

    r75792 r75853  
    7171 * 6.2->6.3 Because pfnGetRequestor was added (VBox 6.0).
    7272 * 6.3->6.4 Bacause pfnConnect got an additional parameter (VBox 6.0).
     73 * 6.4->6.5 Bacause pfnGetVMMDevSessionId was added pfnLoadState got the version
     74 *          parameter (VBox 6.0).
    7375 */
    7476#define VBOX_HGCM_SVC_VERSION_MAJOR (0x0006)
     
    121123     */
    122124    DECLR3CALLBACKMEMBER(uint32_t, pfnGetRequestor, (VBOXHGCMCALLHANDLE hCall));
     125
     126    /**
     127     * Retrieves VMMDevState::idSession.
     128     *
     129     * @returns current VMMDev session ID value.
     130     */
     131    DECLR3CALLBACKMEMBER(uint64_t, pfnGetVMMDevSessionId, (void *pvInstance));
    123132
    124133} VBOXHGCMSVCHELPERS;
     
    495504
    496505    /** Inform the service about a VM load operation. */
    497     DECLR3CALLBACKMEMBER(int, pfnLoadState, (void *pvService, uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM));
     506    DECLR3CALLBACKMEMBER(int, pfnLoadState, (void *pvService, uint32_t u32ClientID, void *pvClient, PSSMHANDLE pSSM,
     507                                             uint32_t uVersion));
    498508
    499509    /** Register a service extension callback. */
     
    505515    /** @} */
    506516} VBOXHGCMSVCFNTABLE;
     517
     518
     519/** @name HGCM saved state
     520 * @note Need to be here so we can add saved to service which doesn't have it.
     521 * @{ */
     522/** HGCM saved state version. */
     523#define HGCM_SAVED_STATE_VERSION        3
     524/** HGCM saved state version w/o client state indicators. */
     525#define HGCM_SAVED_STATE_VERSION_V2     2
     526/** @} */
    507527
    508528
     
    512532#define VBOX_HGCM_SVCLOAD_NAME "VBoxHGCMSvcLoad"
    513533
     534
    514535#endif
  • trunk/include/VBox/vmm/pdmifs.h

    r75771 r75853  
    20942094    DECLR3CALLBACKMEMBER(uint32_t, pfnGetRequestor,(PPDMIHGCMPORT pInterface, PVBOXHGCMCMD pCmd));
    20952095
     2096    /**
     2097     * Gets the VMMDevState::idSession value.
     2098     *
     2099     * @returns VMMDevState::idSession.
     2100     * @param   pInterface          Pointer to this interface.
     2101     */
     2102    DECLR3CALLBACKMEMBER(uint64_t, pfnGetVMMDevSessionId,(PPDMIHGCMPORT pInterface));
     2103
    20962104} PDMIHGCMPORT;
    20972105/** PDMIHGCMPORT interface ID. */
    2098 # define PDMIHGCMPORT_IID                       "0864e1c5-659b-40c8-2c97-994e2983038e"
     2106# define PDMIHGCMPORT_IID                       "c9180235-8102-4642-0aa7-f0422124d9b5"
    20992107
    21002108
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