VirtualBox

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

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

Started with VMM device heap for use with VT-x real-mode emulation. (v86 tss)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.1 KB
Line 
1/* $Id: VMMDevState.h 12687 2008-09-24 14:07:47Z 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 /** R3 pointer to VMMDev Heap RAM area
94 */
95 R3PTRTYPE(VMMDevMemory *) pVMMDevHeapR3;
96 /** GC physical address of VMMDev Heap RAM area */
97 RTGCPHYS32 GCPhysVMMDevHeap;
98
99 /** Information reported by guest via VMMDevReportGuestInfo generic request.
100 * Until this information is reported the VMMDev refuses any other requests.
101 */
102 VBoxGuestInfo guestInfo;
103
104 /** Information reported by guest via VMMDevReportGuestCapabilities
105 */
106 uint32_t guestCaps;
107
108 /** "Additions are Ok" indicator, set to true after processing VMMDevReportGuestInfo,
109 * if additions version is compatible. This flag is here to avoid repeated comparing
110 * of the version in guestInfo.
111 */
112 uint32_t fu32AdditionsOk;
113
114 /** Video acceleration status set by guest. */
115 uint32_t u32VideoAccelEnabled;
116
117 /** resolution change request */
118 struct
119 {
120 uint32_t xres;
121 uint32_t yres;
122 uint32_t bpp;
123 uint32_t display;
124 } displayChangeRequest,
125 lastReadDisplayChangeRequest;
126
127 /** credentials for guest logon purposes */
128 struct
129 {
130 char szUserName[VMMDEV_CREDENTIALS_STRLEN];
131 char szPassword[VMMDEV_CREDENTIALS_STRLEN];
132 char szDomain[VMMDEV_CREDENTIALS_STRLEN];
133 bool fAllowInteractiveLogon;
134 } credentialsLogon;
135
136 /** credentials for verification by guest */
137 struct
138 {
139 char szUserName[VMMDEV_CREDENTIALS_STRLEN];
140 char szPassword[VMMDEV_CREDENTIALS_STRLEN];
141 char szDomain[VMMDEV_CREDENTIALS_STRLEN];
142 } credentialsJudge;
143
144 /* memory balloon change request */
145 uint32_t u32MemoryBalloonSize, u32LastMemoryBalloonSize;
146
147 /* guest ram size */
148 uint64_t cbGuestRAM;
149
150 /* statistics interval change request */
151 uint32_t u32StatIntervalSize, u32LastStatIntervalSize;
152
153 /* seamless mode change request */
154 bool fLastSeamlessEnabled, fSeamlessEnabled;
155
156 bool fVRDPEnabled;
157 uint32_t u32VRDPExperienceLevel;
158
159#ifdef TIMESYNC_BACKDOOR
160 bool fTimesyncBackdoorLo;
161 uint64_t hostTime;
162#endif
163 /** Set if GetHostTime should fail.
164 * Loaded from the GetHostTimeDisabled configuration value. */
165 bool fGetHostTimeDisabled;
166
167 /** Set if backdoor logging should be disabled (output will be ignored then) */
168 bool fBackdoorLogDisabled;
169
170 /** Don't clear credentials */
171 bool fKeepCredentials;
172
173#ifdef VBOX_WITH_HGCM
174 /** List of pending HGCM requests, used for saving the HGCM state. */
175 R3PTRTYPE(PVBOXHGCMCMD) pHGCMCmdList;
176 /** Critical section to protect the list. */
177 RTCRITSECT critsectHGCMCmdList;
178 /** Whether the HGCM events are already automatically enabled. */
179 uint32_t u32HGCMEnabled;
180#endif /* VBOX_WITH_HGCM */
181
182 /* Shared folders LED */
183 struct
184 {
185 /** The LED. */
186 PDMLED Led;
187 /** The LED ports. */
188 PDMILEDPORTS ILeds;
189 /** Partner of ILeds. */
190 R3PTRTYPE(PPDMILEDCONNECTORS) pLedsConnector;
191 } SharedFolders;
192
193} VMMDevState;
194
195void VMMDevNotifyGuest (VMMDevState *pVMMDevState, uint32_t u32EventMask);
196void VMMDevCtlSetGuestFilterMask (VMMDevState *pVMMDevState,
197 uint32_t u32OrMask,
198 uint32_t u32NotMask);
199
200#endif /* !___VMMDev_VMMDevState_h */
201
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