VirtualBox

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

Last change on this file since 3481 was 3379, checked in by vboxsync, 17 years ago

Reimplemented r22537: Automatically enable HGCM host events, when the guest issues HGCM commands.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.0 KB
Line 
1/** @file
2 *
3 * VBox Guest/VMM/host communication:
4 * HGCM - Host-Guest Communication Manager header
5 */
6
7/*
8 * Copyright (C) 2006-2007 innotek GmbH
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License as published by the Free Software Foundation,
14 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
15 * distribution. VirtualBox OSE is distributed in the hope that it will
16 * be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * If you received this file as part of a commercial VirtualBox
19 * distribution, then only the terms of your commercial VirtualBox
20 * license agreement apply instead of the previous paragraph.
21 */
22
23#ifndef __VMMDevState_h__
24#define __VMMDevState_h__
25
26#include <VBox/cdefs.h>
27#include <VBox/types.h>
28
29#include <VBox/pdm.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 PPDMDEVINS pDevIns;
51 /** VMMDev port base interface. */
52 PDMIBASE Base;
53 /** VMMDev port interface. */
54 PDMIVMMDEVPORT Port;
55#ifdef VBOX_HGCM
56 /** HGCM port interface. */
57 PDMIHGCMPORT HGCMPort;
58#endif
59 /** Pointer to base interface of the driver. */
60 PPDMIBASE pDrvBase;
61 /** VMMDev connector interface */
62 PPDMIVMMDEVCONNECTOR pDrv;
63#ifdef VBOX_HGCM
64 /** HGCM connector interface */
65 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 /** HC pointer to VMMDev RAM area */
89 VMMDevMemory *pVMMDevRAMHC;
90 /** GC physical address of VMMDev RAM area */
91 RTGCPHYS GCPhysVMMDevRAM;
92
93 /** Information reported by guest via VMMDevReportGuestInfo generic request.
94 * Until this information is reported the VMMDev refuses any other requests.
95 */
96 VBoxGuestInfo guestInfo;
97
98 /** "Additions are Ok" indicator, set to true after processing VMMDevReportGuestInfo,
99 * if additions version is compatible. This flag is here to avoid repeated comparing
100 * of the version in guestInfo.
101 */
102 uint32_t fu32AdditionsOk;
103
104 /** Video acceleration status set by guest. */
105 uint32_t u32VideoAccelEnabled;
106
107 /** resolution change request */
108 struct
109 {
110 uint32_t xres;
111 uint32_t yres;
112 uint32_t bpp;
113 uint32_t display;
114 } displayChangeRequest,
115 lastReadDisplayChangeRequest;
116
117 /** credentials for guest logon purposes */
118 struct
119 {
120 char szUserName[VMMDEV_CREDENTIALS_STRLEN];
121 char szPassword[VMMDEV_CREDENTIALS_STRLEN];
122 char szDomain[VMMDEV_CREDENTIALS_STRLEN];
123 bool fAllowInteractiveLogon;
124 } credentialsLogon;
125
126 /** credentials for verification by guest */
127 struct
128 {
129 char szUserName[VMMDEV_CREDENTIALS_STRLEN];
130 char szPassword[VMMDEV_CREDENTIALS_STRLEN];
131 char szDomain[VMMDEV_CREDENTIALS_STRLEN];
132 } credentialsJudge;
133
134#ifdef TIMESYNC_BACKDOOR
135 bool fTimesyncBackdoorLo;
136 uint64_t hostTime;
137#endif
138 /** Set if GetHostTime should fail.
139 * Loaded from the GetHostTimeDisabled configuration value. */
140 bool fGetHostTimeDisabled;
141
142 /** Set if backdoor logging should be disabled (output will be ignored then) */
143 bool fBackdoorLogDisabled;
144
145#ifdef VBOX_HGCM
146 /** List of pending HGCM requests, used for saving the HGCM state. */
147 PVBOXHGCMCMD pHGCMCmdList;
148 /** Critical section to protect the list. */
149 RTCRITSECT critsectHGCMCmdList;
150 /** Whether the HGCM events are already automatically enabled. */
151 uint32_t u32HGCMEnabled;
152#endif /* VBOX_HGCM */
153
154} VMMDevState;
155
156void VMMDevNotifyGuest (VMMDevState *pVMMDevState, uint32_t u32EventMask);
157void VMMDevCtlSetGuestFilterMask (VMMDevState *pVMMDevState,
158 uint32_t u32OrMask,
159 uint32_t u32NotMask);
160
161#endif /* __VMMDevState_h__ */
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