VirtualBox

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

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

added VMMDev config option to keep credentials

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