VirtualBox

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

Last change on this file since 22621 was 22433, checked in by vboxsync, 15 years ago

VMMDev: fixed handling guests which did not request a display change request with the eventAck field set (yet) -- xtracker 4227

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.3 KB
Line 
1/* $Id: VMMDevState.h 22433 2009-08-25 12:20:53Z 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/VMMDev.h>
26#include <VBox/pdmdev.h>
27#include <VBox/pdmifs.h>
28
29#define TIMESYNC_BACKDOOR
30
31/** device structure containing all state information */
32typedef struct VMMDevState
33{
34 /** The PCI device structure. */
35 PCIDevice dev;
36
37 /** hypervisor address space size */
38 uint32_t hypervisorSize;
39
40 /** mouse capabilities of host and guest */
41 uint32_t mouseCapabilities;
42 /** absolute mouse position in pixels */
43 uint32_t mouseXAbs;
44 uint32_t mouseYAbs;
45 /** Does the guest currently want the host pointer to be shown? */
46 uint32_t fHostCursorRequested;
47
48 /** Pointer to device instance. */
49 PPDMDEVINSR3 pDevIns;
50 /** VMMDev port base interface. */
51 PDMIBASE Base;
52 /** VMMDev port interface. */
53 PDMIVMMDEVPORT Port;
54#ifdef VBOX_WITH_HGCM
55 /** HGCM port interface. */
56 PDMIHGCMPORT HGCMPort;
57#endif
58 /** Pointer to base interface of the driver. */
59 R3PTRTYPE(PPDMIBASE) pDrvBase;
60 /** VMMDev connector interface */
61 R3PTRTYPE(PPDMIVMMDEVCONNECTOR) pDrv;
62#ifdef VBOX_WITH_HGCM
63 /** HGCM connector interface */
64 R3PTRTYPE(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 /** R3 pointer to VMMDev RAM area */
88 R3PTRTYPE(VMMDevMemory *) pVMMDevRAMR3;
89 /** GC physical address of VMMDev RAM area */
90 RTGCPHYS32 GCPhysVMMDevRAM;
91
92 /** R3 pointer to VMMDev Heap RAM area
93 */
94 R3PTRTYPE(VMMDevMemory *) pVMMDevHeapR3;
95 /** GC physical address of VMMDev Heap RAM area */
96 RTGCPHYS32 GCPhysVMMDevHeap;
97
98 /** Information reported by guest via VMMDevReportGuestInfo generic request.
99 * Until this information is reported the VMMDev refuses any other requests.
100 */
101 VBoxGuestInfo guestInfo;
102
103 /** Information reported by guest via VMMDevReportGuestCapabilities
104 */
105 uint32_t guestCaps;
106
107 /** "Additions are Ok" indicator, set to true after processing VMMDevReportGuestInfo,
108 * if additions version is compatible. This flag is here to avoid repeated comparing
109 * of the version in guestInfo.
110 */
111 uint32_t fu32AdditionsOk;
112
113 /** Video acceleration status set by guest. */
114 uint32_t u32VideoAccelEnabled;
115
116 /** true if the guest responded to VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST at least once */
117 bool fGuestSentChangeEventAck;
118
119 /** resolution change request */
120 struct
121 {
122 uint32_t xres;
123 uint32_t yres;
124 uint32_t bpp;
125 uint32_t display;
126 } displayChangeRequest,
127 lastReadDisplayChangeRequest;
128
129 /** credentials for guest logon purposes */
130 struct
131 {
132 char szUserName[VMMDEV_CREDENTIALS_STRLEN];
133 char szPassword[VMMDEV_CREDENTIALS_STRLEN];
134 char szDomain[VMMDEV_CREDENTIALS_STRLEN];
135 bool fAllowInteractiveLogon;
136 } credentialsLogon;
137
138 /** credentials for verification by guest */
139 struct
140 {
141 char szUserName[VMMDEV_CREDENTIALS_STRLEN];
142 char szPassword[VMMDEV_CREDENTIALS_STRLEN];
143 char szDomain[VMMDEV_CREDENTIALS_STRLEN];
144 } credentialsJudge;
145
146 /* memory balloon change request */
147 uint32_t u32MemoryBalloonSize, u32LastMemoryBalloonSize;
148
149 /* guest ram size */
150 uint64_t cbGuestRAM;
151
152 /* statistics interval change request */
153 uint32_t u32StatIntervalSize, u32LastStatIntervalSize;
154
155 /* seamless mode change request */
156 bool fLastSeamlessEnabled, fSeamlessEnabled;
157
158 bool fVRDPEnabled;
159 uint32_t u32VRDPExperienceLevel;
160
161#ifdef TIMESYNC_BACKDOOR
162 bool fTimesyncBackdoorLo;
163 uint64_t hostTime;
164#endif
165 /** Set if GetHostTime should fail.
166 * Loaded from the GetHostTimeDisabled configuration value. */
167 bool fGetHostTimeDisabled;
168
169 /** Set if backdoor logging should be disabled (output will be ignored then) */
170 bool fBackdoorLogDisabled;
171
172 /** Don't clear credentials */
173 bool fKeepCredentials;
174
175#ifdef VBOX_WITH_HGCM
176 /** List of pending HGCM requests, used for saving the HGCM state. */
177 R3PTRTYPE(PVBOXHGCMCMD) pHGCMCmdList;
178 /** Critical section to protect the list. */
179 RTCRITSECT critsectHGCMCmdList;
180 /** Whether the HGCM events are already automatically enabled. */
181 uint32_t u32HGCMEnabled;
182#endif /* VBOX_WITH_HGCM */
183
184 /* Shared folders LED */
185 struct
186 {
187 /** The LED. */
188 PDMLED Led;
189 /** The LED ports. */
190 PDMILEDPORTS ILeds;
191 /** Partner of ILeds. */
192 R3PTRTYPE(PPDMILEDCONNECTORS) pLedsConnector;
193 } SharedFolders;
194
195 /** The critical section for this device. */
196 PDMCRITSECT CritSect;
197} VMMDevState;
198
199void VMMDevNotifyGuest (VMMDevState *pVMMDevState, uint32_t u32EventMask);
200void VMMDevCtlSetGuestFilterMask (VMMDevState *pVMMDevState,
201 uint32_t u32OrMask,
202 uint32_t u32NotMask);
203
204#endif /* !___VMMDev_VMMDevState_h */
205
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