VirtualBox

source: vbox/trunk/src/VBox/Devices/VMMDev/VMMDevState.h@ 8312

Last change on this file since 8312 was 8312, checked in by vboxsync, 17 years ago

Devices/VMMDev, Frontends/VBoxBFE, Main: add a guest request to report the maximum resolution currently supported by the additions - host side

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.1 KB
Line 
1/* $Id: VMMDevState.h 8312 2008-04-22 21:04:44Z vboxsync $ */
2/** @file
3 * VMMDev - Guest <-> VMM/Host communication device, Internal header.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
20 */
21
22#ifndef ___VMMDevState_h___
23#define ___VMMDevState_h___
24
25#include <VBox/cdefs.h>
26#include <VBox/types.h>
27
28#include <VBox/pdm.h>
29
30#define TIMESYNC_BACKDOOR
31
32/** device structure containing all state information */
33typedef struct VMMDevState
34{
35 /** The PCI device structure. */
36 PCIDevice dev;
37
38 /** hypervisor address space size */
39 uint32_t hypervisorSize;
40
41 /** bit 0: guest capability (1 == wants), bit 1: flag value has changed */
42 /** bit 2: host capability (1 == wants), bit 3: flag value has changed */
43 uint32_t mouseCapabilities;
44 /** absolute mouse position in pixels */
45 uint32_t mouseXAbs;
46 uint32_t mouseYAbs;
47
48 /** Pointer to device instance. */
49 PPDMDEVINS pDevIns;
50 /** VMMDev port base interface. */
51 PDMIBASE Base;
52 /** VMMDev port interface. */
53 PDMIVMMDEVPORT Port;
54#ifdef VBOX_HGCM
55 /** HGCM port interface. */
56 PDMIHGCMPORT HGCMPort;
57#endif
58 /** Pointer to base interface of the driver. */
59 PPDMIBASE pDrvBase;
60 /** VMMDev connector interface */
61 PPDMIVMMDEVCONNECTOR pDrv;
62#ifdef VBOX_HGCM
63 /** HGCM connector interface */
64 PPDMIHGCMCONNECTOR pHGCMDrv;
65#endif
66 /** message buffer for backdoor logging. */
67 char szMsg[512];
68 /** message buffer index. */
69 unsigned iMsg;
70 /** Base port in the assigned I/O space. */
71 RTIOPORT PortBase;
72
73 /** IRQ number assigned to the device */
74 uint32_t irq;
75 /** Current host side event flags */
76 uint32_t u32HostEventFlags;
77 /** Mask of events guest is interested in. Note that the HGCM events
78 * are enabled automatically by the VMMDev device when guest issues
79 * HGCM commands.
80 */
81 uint32_t u32GuestFilterMask;
82 /** Delayed mask of guest events */
83 uint32_t u32NewGuestFilterMask;
84 /** Flag whether u32NewGuestFilterMask is valid */
85 bool fNewGuestFilterMask;
86
87 /** HC pointer to VMMDev RAM area */
88 VMMDevMemory *pVMMDevRAMHC;
89 /** GC physical address of VMMDev RAM area */
90 RTGCPHYS32 GCPhysVMMDevRAM;
91
92 /** Information reported by guest via VMMDevReportGuestInfo generic request.
93 * Until this information is reported the VMMDev refuses any other requests.
94 */
95 VBoxGuestInfo guestInfo;
96
97 /** Information reported by guest via VMMDevReportGuestCapabilities
98 */
99 uint32_t guestCaps;
100
101 /** "Additions are Ok" indicator, set to true after processing VMMDevReportGuestInfo,
102 * if additions version is compatible. This flag is here to avoid repeated comparing
103 * of the version in guestInfo.
104 */
105 uint32_t fu32AdditionsOk;
106
107 /** Video acceleration status set by guest. */
108 uint32_t u32VideoAccelEnabled;
109
110 /** Maximum guest resolution, width - a value of 0 mean no maximum */
111 uint32_t u32MaxGuestWidth;
112 /** Maximum guest resolution, height - a value of 0 mean no maximum */
113 uint32_t u32MaxGuestHeight;
114
115 /** resolution change request */
116 struct
117 {
118 uint32_t xres;
119 uint32_t yres;
120 uint32_t bpp;
121 uint32_t display;
122 } displayChangeRequest,
123 lastReadDisplayChangeRequest;
124
125 /** credentials for guest logon purposes */
126 struct
127 {
128 char szUserName[VMMDEV_CREDENTIALS_STRLEN];
129 char szPassword[VMMDEV_CREDENTIALS_STRLEN];
130 char szDomain[VMMDEV_CREDENTIALS_STRLEN];
131 bool fAllowInteractiveLogon;
132 } credentialsLogon;
133
134 /** credentials for verification by guest */
135 struct
136 {
137 char szUserName[VMMDEV_CREDENTIALS_STRLEN];
138 char szPassword[VMMDEV_CREDENTIALS_STRLEN];
139 char szDomain[VMMDEV_CREDENTIALS_STRLEN];
140 } credentialsJudge;
141
142 /* memory balloon change request */
143 uint32_t u32MemoryBalloonSize, u32LastMemoryBalloonSize;
144
145 /* guest ram size */
146 uint64_t cbGuestRAM;
147
148 /* statistics interval change request */
149 uint32_t u32StatIntervalSize, u32LastStatIntervalSize;
150
151 /* seamless mode change request */
152 bool fLastSeamlessEnabled, fSeamlessEnabled;
153
154 bool fVRDPEnabled;
155 uint32_t u32VRDPExperienceLevel;
156
157#ifdef TIMESYNC_BACKDOOR
158 bool fTimesyncBackdoorLo;
159 uint64_t hostTime;
160#endif
161 /** Set if GetHostTime should fail.
162 * Loaded from the GetHostTimeDisabled configuration value. */
163 bool fGetHostTimeDisabled;
164
165 /** Set if backdoor logging should be disabled (output will be ignored then) */
166 bool fBackdoorLogDisabled;
167
168 /** Don't clear credentials */
169 bool fKeepCredentials;
170
171#ifdef VBOX_HGCM
172 /** List of pending HGCM requests, used for saving the HGCM state. */
173 PVBOXHGCMCMD pHGCMCmdList;
174 /** Critical section to protect the list. */
175 RTCRITSECT critsectHGCMCmdList;
176 /** Whether the HGCM events are already automatically enabled. */
177 uint32_t u32HGCMEnabled;
178#endif /* VBOX_HGCM */
179
180 /* Shared folders LED */
181 struct
182 {
183 /** The LED. */
184 PDMLED Led;
185 /** The LED ports. */
186 PDMILEDPORTS ILeds;
187 /** Partner of ILeds. */
188 R3PTRTYPE(PPDMILEDCONNECTORS) pLedsConnector;
189 } SharedFolders;
190
191} VMMDevState;
192
193void VMMDevNotifyGuest (VMMDevState *pVMMDevState, uint32_t u32EventMask);
194void VMMDevCtlSetGuestFilterMask (VMMDevState *pVMMDevState,
195 uint32_t u32OrMask,
196 uint32_t u32NotMask);
197
198#endif /* !___VMMDevState_h___ */
199
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette