VirtualBox

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

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

Connect page fusion part 2

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