VirtualBox

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

Last change on this file since 11820 was 11820, checked in by vboxsync, 16 years ago

made Qt4 the default GUI; VBOX_VRDP => VBOX_WITH_VRDP; VBOX_HGCM => VBOX_WITH_HGCM; Makefile cleanup

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.0 KB
Line 
1/* $Id: VMMDevState.h 11820 2008-08-29 14:09:39Z 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 ___VMMDev_VMMDevState_h
23#define ___VMMDev_VMMDevState_h
24
25#include <VBox/cdefs.h>
26#include <VBox/types.h>
27
28#include <VBox/pdmdev.h>
29#include <VBox/pdmifs.h>
30
31#define TIMESYNC_BACKDOOR
32
33/** device structure containing all state information */
34typedef struct VMMDevState
35{
36 /** The PCI device structure. */
37 PCIDevice dev;
38
39 /** hypervisor address space size */
40 uint32_t hypervisorSize;
41
42 /** bit 0: guest capability (1 == wants), bit 1: flag value has changed */
43 /** bit 2: host capability (1 == wants), bit 3: flag value has changed */
44 uint32_t mouseCapabilities;
45 /** absolute mouse position in pixels */
46 uint32_t mouseXAbs;
47 uint32_t mouseYAbs;
48
49 /** Pointer to device instance. */
50 PPDMDEVINSR3 pDevIns;
51 /** VMMDev port base interface. */
52 PDMIBASE Base;
53 /** VMMDev port interface. */
54 PDMIVMMDEVPORT Port;
55#ifdef VBOX_WITH_HGCM
56 /** HGCM port interface. */
57 PDMIHGCMPORT HGCMPort;
58#endif
59 /** Pointer to base interface of the driver. */
60 R3PTRTYPE(PPDMIBASE) pDrvBase;
61 /** VMMDev connector interface */
62 R3PTRTYPE(PPDMIVMMDEVCONNECTOR) pDrv;
63#ifdef VBOX_WITH_HGCM
64 /** HGCM connector interface */
65 R3PTRTYPE(PPDMIHGCMCONNECTOR) pHGCMDrv;
66#endif
67 /** message buffer for backdoor logging. */
68 char szMsg[512];
69 /** message buffer index. */
70 unsigned iMsg;
71 /** Base port in the assigned I/O space. */
72 RTIOPORT PortBase;
73
74 /** IRQ number assigned to the device */
75 uint32_t irq;
76 /** Current host side event flags */
77 uint32_t u32HostEventFlags;
78 /** Mask of events guest is interested in. Note that the HGCM events
79 * are enabled automatically by the VMMDev device when guest issues
80 * HGCM commands.
81 */
82 uint32_t u32GuestFilterMask;
83 /** Delayed mask of guest events */
84 uint32_t u32NewGuestFilterMask;
85 /** Flag whether u32NewGuestFilterMask is valid */
86 bool fNewGuestFilterMask;
87
88 /** R3 pointer to VMMDev RAM area */
89 R3PTRTYPE(VMMDevMemory *) pVMMDevRAMR3;
90 /** GC physical address of VMMDev RAM area */
91 RTGCPHYS32 GCPhysVMMDevRAM;
92
93 /** Information reported by guest via VMMDevReportGuestInfo generic request.
94 * Until this information is reported the VMMDev refuses any other requests.
95 */
96 VBoxGuestInfo guestInfo;
97
98 /** Information reported by guest via VMMDevReportGuestCapabilities
99 */
100 uint32_t guestCaps;
101
102 /** "Additions are Ok" indicator, set to true after processing VMMDevReportGuestInfo,
103 * if additions version is compatible. This flag is here to avoid repeated comparing
104 * of the version in guestInfo.
105 */
106 uint32_t fu32AdditionsOk;
107
108 /** Video acceleration status set by guest. */
109 uint32_t u32VideoAccelEnabled;
110
111 /** resolution change request */
112 struct
113 {
114 uint32_t xres;
115 uint32_t yres;
116 uint32_t bpp;
117 uint32_t display;
118 } displayChangeRequest,
119 lastReadDisplayChangeRequest;
120
121 /** credentials for guest logon purposes */
122 struct
123 {
124 char szUserName[VMMDEV_CREDENTIALS_STRLEN];
125 char szPassword[VMMDEV_CREDENTIALS_STRLEN];
126 char szDomain[VMMDEV_CREDENTIALS_STRLEN];
127 bool fAllowInteractiveLogon;
128 } credentialsLogon;
129
130 /** credentials for verification by guest */
131 struct
132 {
133 char szUserName[VMMDEV_CREDENTIALS_STRLEN];
134 char szPassword[VMMDEV_CREDENTIALS_STRLEN];
135 char szDomain[VMMDEV_CREDENTIALS_STRLEN];
136 } credentialsJudge;
137
138 /* memory balloon change request */
139 uint32_t u32MemoryBalloonSize, u32LastMemoryBalloonSize;
140
141 /* guest ram size */
142 uint64_t cbGuestRAM;
143
144 /* statistics interval change request */
145 uint32_t u32StatIntervalSize, u32LastStatIntervalSize;
146
147 /* seamless mode change request */
148 bool fLastSeamlessEnabled, fSeamlessEnabled;
149
150 bool fVRDPEnabled;
151 uint32_t u32VRDPExperienceLevel;
152
153#ifdef TIMESYNC_BACKDOOR
154 bool fTimesyncBackdoorLo;
155 uint64_t hostTime;
156#endif
157 /** Set if GetHostTime should fail.
158 * Loaded from the GetHostTimeDisabled configuration value. */
159 bool fGetHostTimeDisabled;
160
161 /** Set if backdoor logging should be disabled (output will be ignored then) */
162 bool fBackdoorLogDisabled;
163
164 /** Don't clear credentials */
165 bool fKeepCredentials;
166
167#ifdef VBOX_WITH_HGCM
168 /** List of pending HGCM requests, used for saving the HGCM state. */
169 R3PTRTYPE(PVBOXHGCMCMD) pHGCMCmdList;
170 /** Critical section to protect the list. */
171 RTCRITSECT critsectHGCMCmdList;
172 /** Whether the HGCM events are already automatically enabled. */
173 uint32_t u32HGCMEnabled;
174#endif /* VBOX_WITH_HGCM */
175
176 /* Shared folders LED */
177 struct
178 {
179 /** The LED. */
180 PDMLED Led;
181 /** The LED ports. */
182 PDMILEDPORTS ILeds;
183 /** Partner of ILeds. */
184 R3PTRTYPE(PPDMILEDCONNECTORS) pLedsConnector;
185 } SharedFolders;
186
187} VMMDevState;
188
189void VMMDevNotifyGuest (VMMDevState *pVMMDevState, uint32_t u32EventMask);
190void VMMDevCtlSetGuestFilterMask (VMMDevState *pVMMDevState,
191 uint32_t u32OrMask,
192 uint32_t u32NotMask);
193
194#endif /* !___VMMDev_VMMDevState_h */
195
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