VirtualBox

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

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

VMMDev: separately process video mode hints for different guest displays (xTracker 4655)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.2 KB
Line 
1/* $Id: VMMDevState.h 27891 2010-03-31 13:02:04Z 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
31typedef struct DISPLAYCHANGEINFO
32{
33 uint32_t xres;
34 uint32_t yres;
35 uint32_t bpp;
36 uint32_t display;
37} DISPLAYCHANGEINFO;
38
39typedef struct DISPLAYCHANGEREQUEST
40{
41 bool fPending;
42 DISPLAYCHANGEINFO displayChangeRequest;
43 DISPLAYCHANGEINFO lastReadDisplayChangeRequest;
44} DISPLAYCHANGEREQUEST;
45
46typedef struct DISPLAYCHANGEDATA
47{
48 /* Which monitor is being reported to the guest. */
49 int iCurrentMonitor;
50
51 /** true if the guest responded to VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST at least once */
52 bool fGuestSentChangeEventAck;
53
54 DISPLAYCHANGEREQUEST aRequests[64]; // @todo maxMonitors
55} DISPLAYCHANGEDATA;
56
57
58/** device structure containing all state information */
59typedef struct VMMDevState
60{
61 /** The PCI device structure. */
62 PCIDevice dev;
63
64 /** The critical section for this device. */
65 PDMCRITSECT CritSect;
66
67 /** hypervisor address space size */
68 uint32_t hypervisorSize;
69
70 /** mouse capabilities of host and guest */
71 uint32_t mouseCapabilities;
72 /** absolute mouse position in pixels */
73 uint32_t mouseXAbs;
74 uint32_t mouseYAbs;
75 /** Does the guest currently want the host pointer to be shown? */
76 uint32_t fHostCursorRequested;
77
78 /** Pointer to device instance. */
79 PPDMDEVINSR3 pDevIns;
80 /** LUN\#0 + Status: VMMDev port base interface. */
81 PDMIBASE IBase;
82 /** LUN\#0: VMMDev port interface. */
83 PDMIVMMDEVPORT IPort;
84#ifdef VBOX_WITH_HGCM
85 /** LUN\#0: HGCM port interface. */
86 PDMIHGCMPORT IHGCMPort;
87#endif
88 /** Pointer to base interface of the driver. */
89 R3PTRTYPE(PPDMIBASE) pDrvBase;
90 /** VMMDev connector interface */
91 R3PTRTYPE(PPDMIVMMDEVCONNECTOR) pDrv;
92#ifdef VBOX_WITH_HGCM
93 /** HGCM connector interface */
94 R3PTRTYPE(PPDMIHGCMCONNECTOR) pHGCMDrv;
95#endif
96 /** message buffer for backdoor logging. */
97 char szMsg[512];
98 /** message buffer index. */
99 unsigned iMsg;
100 /** Base port in the assigned I/O space. */
101 RTIOPORT PortBase;
102
103 /** IRQ number assigned to the device */
104 uint32_t irq;
105 /** Current host side event flags */
106 uint32_t u32HostEventFlags;
107 /** Mask of events guest is interested in. Note that the HGCM events
108 * are enabled automatically by the VMMDev device when guest issues
109 * HGCM commands.
110 */
111 uint32_t u32GuestFilterMask;
112 /** Delayed mask of guest events */
113 uint32_t u32NewGuestFilterMask;
114 /** Flag whether u32NewGuestFilterMask is valid */
115 bool fNewGuestFilterMask;
116
117 /** R3 pointer to VMMDev RAM area */
118 R3PTRTYPE(VMMDevMemory *) pVMMDevRAMR3;
119 /** GC physical address of VMMDev RAM area */
120 RTGCPHYS32 GCPhysVMMDevRAM;
121
122 /** R3 pointer to VMMDev Heap RAM area
123 */
124 R3PTRTYPE(VMMDevMemory *) pVMMDevHeapR3;
125 /** GC physical address of VMMDev Heap RAM area */
126 RTGCPHYS32 GCPhysVMMDevHeap;
127
128 /** Information reported by guest via VMMDevReportGuestInfo generic request.
129 * Until this information is reported the VMMDev refuses any other requests.
130 */
131 VBoxGuestInfo guestInfo;
132
133 /** Information reported by guest via VMMDevReportGuestCapabilities
134 */
135 uint32_t guestCaps;
136
137 /** "Additions are Ok" indicator, set to true after processing VMMDevReportGuestInfo,
138 * if additions version is compatible. This flag is here to avoid repeated comparing
139 * of the version in guestInfo.
140 */
141 uint32_t fu32AdditionsOk;
142
143 /** Video acceleration status set by guest. */
144 uint32_t u32VideoAccelEnabled;
145
146 DISPLAYCHANGEDATA displayChangeData;
147
148 /** credentials for guest logon purposes */
149 struct
150 {
151 char szUserName[VMMDEV_CREDENTIALS_STRLEN];
152 char szPassword[VMMDEV_CREDENTIALS_STRLEN];
153 char szDomain[VMMDEV_CREDENTIALS_STRLEN];
154 bool fAllowInteractiveLogon;
155 } credentialsLogon;
156
157 /** credentials for verification by guest */
158 struct
159 {
160 char szUserName[VMMDEV_CREDENTIALS_STRLEN];
161 char szPassword[VMMDEV_CREDENTIALS_STRLEN];
162 char szDomain[VMMDEV_CREDENTIALS_STRLEN];
163 } credentialsJudge;
164
165 /* memory balloon change request */
166 uint32_t u32MemoryBalloonSize, u32LastMemoryBalloonSize;
167
168 /* guest ram size */
169 uint64_t cbGuestRAM;
170
171 /* statistics interval change request */
172 uint32_t u32StatIntervalSize, u32LastStatIntervalSize;
173
174 /* seamless mode change request */
175 bool fLastSeamlessEnabled, fSeamlessEnabled;
176
177 bool fVRDPEnabled;
178 uint32_t u32VRDPExperienceLevel;
179
180#ifdef TIMESYNC_BACKDOOR
181 bool fTimesyncBackdoorLo;
182 uint64_t hostTime;
183#endif
184 /** Set if GetHostTime should fail.
185 * Loaded from the GetHostTimeDisabled configuration value. */
186 bool fGetHostTimeDisabled;
187
188 /** Set if backdoor logging should be disabled (output will be ignored then) */
189 bool fBackdoorLogDisabled;
190
191 /** Don't clear credentials */
192 bool fKeepCredentials;
193
194 /** Heap enabled. */
195 bool fHeapEnabled;
196
197#ifdef VBOX_WITH_HGCM
198 /** List of pending HGCM requests, used for saving the HGCM state. */
199 R3PTRTYPE(PVBOXHGCMCMD) pHGCMCmdList;
200 /** Critical section to protect the list. */
201 RTCRITSECT critsectHGCMCmdList;
202 /** Whether the HGCM events are already automatically enabled. */
203 uint32_t u32HGCMEnabled;
204#endif /* VBOX_WITH_HGCM */
205
206 /** Status LUN: Shared folders LED */
207 struct
208 {
209 /** The LED. */
210 PDMLED Led;
211 /** The LED ports. */
212 PDMILEDPORTS ILeds;
213 /** Partner of ILeds. */
214 R3PTRTYPE(PPDMILEDCONNECTORS) pLedsConnector;
215 } SharedFolders;
216
217 /** FLag whether CPU hotplug events are monitored */
218 bool fCpuHotPlugEventsEnabled;
219 /** CPU hotplug event */
220 VMMDevCpuEventType enmCpuHotPlugEvent;
221 /** Core id of the CPU to change */
222 uint32_t idCpuCore;
223 /** Package id of the CPU to changhe */
224 uint32_t idCpuPackage;
225
226 uint32_t StatMemBalloonChunks;
227} VMMDevState;
228AssertCompileMemberAlignment(VMMDevState, CritSect, 8);
229
230void VMMDevNotifyGuest (VMMDevState *pVMMDevState, uint32_t u32EventMask);
231void VMMDevCtlSetGuestFilterMask (VMMDevState *pVMMDevState,
232 uint32_t u32OrMask,
233 uint32_t u32NotMask);
234
235#endif /* !___VMMDev_VMMDevState_h */
236
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