diff options
Diffstat (limited to 'include/VBox/VMMDev.h')
-rw-r--r-- | include/VBox/VMMDev.h | 143 |
1 files changed, 125 insertions, 18 deletions
diff --git a/include/VBox/VMMDev.h b/include/VBox/VMMDev.h index fe81237d..fb850625 100644 --- a/include/VBox/VMMDev.h +++ b/include/VBox/VMMDev.h @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2006-2011 Oracle Corporation + * Copyright (C) 2006-2013 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -35,8 +35,10 @@ #include <iprt/assert.h> +#pragma pack(4) /* force structure dword packing here. */ RT_C_DECLS_BEGIN + /** @defgroup grp_vmmdev VMM Device * * Note! This interface cannot be changed, it can only be extended! @@ -114,6 +116,10 @@ RT_C_DECLS_BEGIN /** Maximum request packet size. */ #define VMMDEV_MAX_VMMDEVREQ_SIZE _1M +/** Maximum number of HGCM parameters. */ +#define VMMDEV_MAX_HGCM_PARMS 1024 +/** Maximum total size of hgcm buffers in one call. */ +#define VMMDEV_MAX_HGCM_DATA_SIZE UINT32_C(0x7FFFFFFF) /** * VMMDev request types. @@ -138,6 +144,7 @@ typedef enum VMMDevReq_ReportGuestInfo = 50, VMMDevReq_ReportGuestInfo2 = 58, /* since version 3.2.0 */ VMMDevReq_ReportGuestStatus = 59, /* since version 3.2.8 */ + VMMDevReq_ReportGuestUserState = 74, /* since version 4.3 */ /** * Retrieve a display resize request sent by the host using * @a IDisplay:setVideoModeHint. Deprecated. @@ -170,6 +177,7 @@ typedef enum VMMDevReq_ReportGuestCapabilities = 55, VMMDevReq_SetGuestCapabilities = 56, VMMDevReq_VideoModeSupported2 = 57, /* since version 3.2.0 */ + VMMDevReq_GetDisplayChangeRequestEx = 80, /* since version 4.2.4 */ #ifdef VBOX_WITH_HGCM VMMDevReq_HGCMConnect = 60, VMMDevReq_HGCMDisconnect = 61, @@ -231,7 +239,6 @@ typedef enum /** Version of VMMDevRequestHeader structure. */ #define VMMDEV_REQUEST_HEADER_VERSION (0x10001) -#pragma pack(4) /* force structure dword packing here. */ /** * Generic VMMDev request header. @@ -286,8 +293,7 @@ AssertCompileSize(VMMDevReqMouseStatus, 24+12); * cursor itself, the guest installs a hardware mouse driver. Don't ask the * guest to switch to a software cursor then. */ #define VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR RT_BIT(2) -/** The host does NOT provide support for drawing the cursor itself. - * This is for instance the case for the L4 console. */ +/** The host does NOT provide support for drawing the cursor itself. */ #define VMMDEV_MOUSE_HOST_CANNOT_HWPOINTER RT_BIT(3) /** The guest can read VMMDev events to find out about pointer movement */ #define VMMDEV_MOUSE_NEW_PROTOCOL RT_BIT(4) @@ -800,6 +806,73 @@ AssertCompileSize(VMMDevReportGuestStatus, 24+12); /** + * The current status of specific guest user. + * This needs to be kept in sync with GuestUserState of the Main API! + */ +typedef enum VBoxGuestUserState +{ + VBoxGuestUserState_Unknown = 0, + VBoxGuestUserState_LoggedIn = 1, + VBoxGuestUserState_LoggedOut = 2, + VBoxGuestUserState_Locked = 3, + VBoxGuestUserState_Unlocked = 4, + VBoxGuestUserState_Disabled = 5, + VBoxGuestUserState_Idle = 6, + VBoxGuestUserState_InUse = 7, + VBoxGuestUserState_Created = 8, + VBoxGuestUserState_Deleted = 9, + VBoxGuestUserState_SessionChanged = 10, + VBoxGuestUserState_CredentialsChanged = 11, + VBoxGuestUserState_RoleChanged = 12, + VBoxGuestUserState_GroupAdded = 13, + VBoxGuestUserState_GroupRemoved = 14, + VBoxGuestUserState_Elevated = 15, + VBoxGuestUserState_SizeHack = 0x7fffffff +} VBoxGuestUserState; +AssertCompileSize(VBoxGuestUserState, 4); + + +/** + * Guest user status updates. + */ +typedef struct VBoxGuestUserStatus +{ + /** The guest user state to send. */ + VBoxGuestUserState state; + /** Size (in bytes) of szUser. */ + uint32_t cbUser; + /** Size (in bytes) of szDomain. */ + uint32_t cbDomain; + /** Size (in bytes) of aDetails. */ + uint32_t cbDetails; + /** Note: Here begins the dynamically + * allocated region. */ + /** Guest user to report state for. */ + char szUser[1]; + /** Domain the guest user is bound to. */ + char szDomain[1]; + /** Optional details of the state. */ + uint8_t aDetails[1]; +} VBoxGuestUserStatus; +AssertCompileSize(VBoxGuestUserStatus, 20); + + +/** + * Guest user status structure. + * + * Used by VMMDevReq_ReportGuestUserStatus. + */ +typedef struct +{ + /** Header. */ + VMMDevRequestHeader header; + /** Guest user status. */ + VBoxGuestUserStatus status; +} VMMDevReportGuestUserState; +AssertCompileSize(VMMDevReportGuestUserState, 24+20); + + +/** * Guest statistics structure. * * Used by VMMDevReportGuestStats and PDMIVMMDEVCONNECTOR::pfnReportStatistics. @@ -959,7 +1032,6 @@ AssertCompileSize(VMMDevGetStatisticsChangeRequest, 24+8); * * Used by VMMDevReq_QueryCredentials. */ -#pragma pack(4) typedef struct { /** Header. */ @@ -974,7 +1046,6 @@ typedef struct char szDomain[VMMDEV_CREDENTIALS_SZ_SIZE]; } VMMDevCredentials; AssertCompileSize(VMMDevCredentials, 24+4+3*128); -#pragma pack() /** @name Credentials request flag (VMMDevCredentials::u32Flags) * @{ */ @@ -1072,6 +1143,40 @@ AssertCompileSize(VMMDevDisplayChangeRequest2, 24+20); /** + * Display change request structure, version Extended. + * + * Used by VMMDevReq_GetDisplayChangeRequestEx. + */ +typedef struct +{ + /** Header. */ + VMMDevRequestHeader header; + /** Horizontal pixel resolution (0 = do not change). */ + uint32_t xres; + /** Vertical pixel resolution (0 = do not change). */ + uint32_t yres; + /** Bits per pixel (0 = do not change). */ + uint32_t bpp; + /** Setting this to VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST indicates + * that the request is a response to that event. + * (Don't confuse this with VMMDevReq_AcknowledgeEvents.) */ + uint32_t eventAck; + /** 0 for primary display, 1 for the first secondary, etc. */ + uint32_t display; + /** New OriginX of secondary virtual screen */ + uint32_t cxOrigin; + /** New OriginY of secondary virtual screen */ + uint32_t cyOrigin; + /** Change in origin of the secondary virtaul scree is + * required */ + bool fChangeOrigin; + /** secondary virtual screen enabled or disabled */ + bool fEnabled; +} VMMDevDisplayChangeRequestEx; +AssertCompileSize(VMMDevDisplayChangeRequestEx, 24+32); + + +/** * Video mode supported request structure. * * Used by VMMDevReq_VideoModeSupported. @@ -1388,8 +1493,6 @@ typedef struct AssertCompileSize(VMMDevReqWriteCoreDump, 24+4); -#pragma pack() - #ifdef VBOX_WITH_HGCM @@ -1401,8 +1504,6 @@ AssertCompileSize(VMMDevReqWriteCoreDump, 24+4); # define VBOX_HGCM_REQ_CANCELLED (0x2) /** @} */ -# pragma pack(4) - /** * HGCM request header. */ @@ -1745,7 +1846,6 @@ typedef struct } HGCMPageListInfo; AssertCompileSize(HGCMPageListInfo, 4+2+2+8); -# pragma pack() /** Get the pointer to the first parmater of a HGCM call request. */ # define VMMDEV_HGCM_CALL_PARMS(a) ((HGCMFunctionParameter *)((uint8_t *)(a) + sizeof (VMMDevHGCMCall))) @@ -1800,6 +1900,7 @@ AssertCompileSize(VMMDevHGCMCancel2, 24+4); /** * Inline helper to determine the request size for the given operation. + * Returns 0 if the given operation is not handled and/or supported. * * @returns Size. * @param requestType The VMMDev request type. @@ -1835,10 +1936,14 @@ DECLINLINE(size_t) vmmdevGetRequestSize(VMMDevRequestType requestType) return sizeof(VMMDevReportGuestInfo2); case VMMDevReq_ReportGuestStatus: return sizeof(VMMDevReportGuestStatus); + case VMMDevReq_ReportGuestUserState: + return sizeof(VMMDevReportGuestUserState); case VMMDevReq_GetDisplayChangeRequest: return sizeof(VMMDevDisplayChangeRequest); case VMMDevReq_GetDisplayChangeRequest2: return sizeof(VMMDevDisplayChangeRequest2); + case VMMDevReq_GetDisplayChangeRequestEx: + return sizeof(VMMDevDisplayChangeRequestEx); case VMMDevReq_VideoModeSupported: return sizeof(VMMDevVideoModeSupportedRequest); case VMMDevReq_GetHeightReduction: @@ -1907,8 +2012,10 @@ DECLINLINE(size_t) vmmdevGetRequestSize(VMMDevRequestType requestType) case VMMDevReq_GetSessionId: return sizeof(VMMDevReqSessionId); default: - return 0; + break; } + + return 0; } @@ -1944,7 +2051,6 @@ DECLINLINE(int) vmmdevInitRequest(VMMDevRequestHeader *req, VMMDevRequestType ty * * @todo Where does this fit in? */ -#pragma pack(1) /* unnecessary */ typedef struct VBVACMDHDR { /** Coordinates of affected rectangle. */ @@ -1953,7 +2059,7 @@ typedef struct VBVACMDHDR uint16_t w; uint16_t h; } VBVACMDHDR; -#pragma pack() +AssertCompileSize(VBVACMDHDR, 8); /** @name VBVA ring defines. * @@ -1983,6 +2089,8 @@ typedef struct VBVACMDHDR #define VBVA_F_MODE_VRDP_RESET (0x00000004) #define VBVA_F_MODE_VRDP_ORDER_MASK (0x00000008) +#define VBVA_F_STATE_PROCESSING (0x00010000) + #define VBVA_F_RECORD_PARTIAL (0x80000000) /** @} */ @@ -2002,7 +2110,6 @@ AssertCompileSize(VBVARECORD, 4); * * This is a subsection of the VMMDevMemory structure. */ -#pragma pack(1) /* paranoia */ typedef struct VBVAMEMORY { /** VBVA_F_MODE_*. */ @@ -2029,14 +2136,12 @@ typedef struct VBVAMEMORY uint32_t fu32SupportedOrders; } VBVAMEMORY; -#pragma pack() AssertCompileSize(VBVAMEMORY, 12 + (_4M-_1K) + 4*64 + 12); /** * The layout of VMMDEV RAM region that contains information for guest. */ -#pragma pack(1) /* paranoia */ typedef struct VMMDevMemory { /** The size of this structure. */ @@ -2065,13 +2170,15 @@ typedef struct VMMDevMemory } VMMDevMemory; AssertCompileSize(VMMDevMemory, 8+8 + (12 + (_4M-_1K) + 4*64 + 12) ); -#pragma pack() +AssertCompileMemberOffset(VMMDevMemory, vbvaMemory, 16); /** Version of VMMDevMemory structure (VMMDevMemory::u32Version). */ #define VMMDEV_MEMORY_VERSION (1) /** @} */ + RT_C_DECLS_END +#pragma pack() #endif |