VirtualBox

source: vbox/trunk/src/VBox/VMM/include/GIMInternal.h@ 67837

Last change on this file since 67837 was 62478, checked in by vboxsync, 8 years ago

(C) 2016

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/* $Id: GIMInternal.h 62478 2016-07-22 18:29:06Z vboxsync $ */
2/** @file
3 * GIM - Internal header file.
4 */
5
6/*
7 * Copyright (C) 2014-2016 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 ___GIMInternal_h
19#define ___GIMInternal_h
20
21#include <VBox/vmm/gim.h>
22#include <VBox/vmm/pgm.h>
23#include "GIMHvInternal.h"
24#include "GIMKvmInternal.h"
25#include "GIMMinimalInternal.h"
26
27RT_C_DECLS_BEGIN
28
29/** @defgroup grp_gim_int Internal
30 * @ingroup grp_gim
31 * @internal
32 * @{
33 */
34
35/** The saved state version. */
36#define GIM_SAVED_STATE_VERSION 1
37
38/**
39 * GIM VM Instance data.
40 */
41typedef struct GIM
42{
43 /** The provider that is active for this VM. */
44 GIMPROVIDERID enmProviderId;
45 /** The interface implementation version. */
46 uint32_t u32Version;
47
48 /** Physical access handler type for semi-read-only MMIO2 memory. Lazy creation. */
49 PGMPHYSHANDLERTYPE hSemiReadOnlyMmio2Handler;
50 /** Alignment padding. */
51 uint32_t u32Padding;
52
53 /** Pointer to the GIM device - R3 ptr. */
54 R3PTRTYPE(PPDMDEVINS) pDevInsR3;
55 /** The debug struct - R3 ptr. */
56 R3PTRTYPE(PGIMDEBUG) pDbgR3;
57
58 /** The provider specific data. */
59 union
60 {
61 GIMHV Hv;
62 GIMKVM Kvm;
63 } u;
64
65 /** Number of hypercalls initiated. */
66 STAMCOUNTER StatHypercalls;
67 /** Debug packets sent. */
68 STAMCOUNTER StatDbgXmit;
69 /** Debug bytes sent. */
70 STAMCOUNTER StatDbgXmitBytes;
71 /** Debug packets received. */
72 STAMCOUNTER StatDbgRecv;
73 /** Debug bytes received. */
74 STAMCOUNTER StatDbgRecvBytes;
75} GIM;
76/** Pointer to GIM VM instance data. */
77typedef GIM *PGIM;
78
79/**
80 * GIM VMCPU Instance data.
81 */
82typedef struct GIMCPU
83{
84 union
85 {
86 GIMKVMCPU KvmCpu;
87 GIMHVCPU HvCpu;
88 } u;
89} GIMCPU;
90/** Pointer to GIM VMCPU instance data. */
91typedef GIMCPU *PGIMCPU;
92
93/**
94 * Callback when a debug buffer read has completed and before signaling
95 * the next read.
96 *
97 * @param pVM The cross context VM structure.
98 */
99typedef DECLCALLBACK(void) FNGIMDEBUGBUFREADCOMPLETED(PVM pVM);
100/** Pointer to GIM debug buffer read completion callback. */
101typedef FNGIMDEBUGBUFREADCOMPLETED *PFNGIMDEBUGBUFREADCOMPLETED;
102
103#ifdef IN_RING3
104#if 0
105VMMR3_INT_DECL(int) gimR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion);
106VMMR3_INT_DECL(int) gimR3Mmio2Map(PVM pVM, PGIMMMIO2REGION pRegion, RTGCPHYS GCPhysRegion);
107VMMR3_INT_DECL(int) gimR3Mmio2HandlerPhysicalRegister(PVM pVM, PGIMMMIO2REGION pRegion);
108VMMR3_INT_DECL(int) gimR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion);
109#endif
110
111VMMR3_INT_DECL(int) gimR3DebugRead(PVM pVM, void *pvRead, size_t *pcbRead, PFNGIMDEBUGBUFREADCOMPLETED pfnReadComplete);
112VMMR3_INT_DECL(int) gimR3DebugWrite(PVM pVM, void *pvWrite, size_t *pcbWrite);
113#endif /* IN_RING3 */
114
115/** @} */
116
117RT_C_DECLS_END
118
119#endif
120
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