VirtualBox

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

Last change on this file since 100594 was 98103, checked in by vboxsync, 23 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1/* $Id: GIMInternal.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * GIM - Internal header file.
4 */
5
6/*
7 * Copyright (C) 2014-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef VMM_INCLUDED_SRC_include_GIMInternal_h
29#define VMM_INCLUDED_SRC_include_GIMInternal_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include <VBox/vmm/gim.h>
35#include <VBox/vmm/pgm.h>
36#include "GIMHvInternal.h"
37#include "GIMKvmInternal.h"
38#include "GIMMinimalInternal.h"
39
40RT_C_DECLS_BEGIN
41
42/** @defgroup grp_gim_int Internal
43 * @ingroup grp_gim
44 * @internal
45 * @{
46 */
47
48/** The saved state version. */
49#define GIM_SAVED_STATE_VERSION 1
50
51/**
52 * GIM VM Instance data.
53 */
54typedef struct GIM
55{
56 /** The provider that is active for this VM. */
57 GIMPROVIDERID enmProviderId;
58 /** The interface implementation version. */
59 uint32_t u32Version;
60
61 /** Physical access handler type for semi-read-only MMIO2 memory. Lazy creation. */
62 PGMPHYSHANDLERTYPE hSemiReadOnlyMmio2Handler;
63
64 /** Pointer to the GIM device - R3 ptr. */
65 R3PTRTYPE(PPDMDEVINS) pDevInsR3;
66 /** The debug struct - R3 ptr. */
67 R3PTRTYPE(PGIMDEBUG) pDbgR3;
68
69 /** The provider specific data. */
70 union
71 {
72 GIMHV Hv;
73 GIMKVM Kvm;
74 } u;
75
76 /** Number of hypercalls initiated. */
77 STAMCOUNTER StatHypercalls;
78 /** Debug packets sent. */
79 STAMCOUNTER StatDbgXmit;
80 /** Debug bytes sent. */
81 STAMCOUNTER StatDbgXmitBytes;
82 /** Debug packets received. */
83 STAMCOUNTER StatDbgRecv;
84 /** Debug bytes received. */
85 STAMCOUNTER StatDbgRecvBytes;
86} GIM;
87/** Pointer to GIM VM instance data. */
88typedef GIM *PGIM;
89
90/**
91 * GIM VMCPU Instance data.
92 */
93typedef struct GIMCPU
94{
95 union
96 {
97 GIMKVMCPU KvmCpu;
98 GIMHVCPU HvCpu;
99 } u;
100} GIMCPU;
101/** Pointer to GIM VMCPU instance data. */
102typedef GIMCPU *PGIMCPU;
103
104/**
105 * Callback when a debug buffer read has completed and before signalling the next
106 * read.
107 *
108 * @param pVM The cross context VM structure.
109 */
110typedef DECLCALLBACKTYPE(void, FNGIMDEBUGBUFREADCOMPLETED,(PVM pVM));
111/** Pointer to GIM debug buffer read completion callback. */
112typedef FNGIMDEBUGBUFREADCOMPLETED *PFNGIMDEBUGBUFREADCOMPLETED;
113
114#ifdef IN_RING3
115#if 0
116VMMR3_INT_DECL(int) gimR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion);
117VMMR3_INT_DECL(int) gimR3Mmio2Map(PVM pVM, PGIMMMIO2REGION pRegion, RTGCPHYS GCPhysRegion);
118VMMR3_INT_DECL(int) gimR3Mmio2HandlerPhysicalRegister(PVM pVM, PGIMMMIO2REGION pRegion);
119VMMR3_INT_DECL(int) gimR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion);
120#endif
121
122VMMR3_INT_DECL(int) gimR3DebugRead(PVM pVM, void *pvRead, size_t *pcbRead, PFNGIMDEBUGBUFREADCOMPLETED pfnReadComplete);
123VMMR3_INT_DECL(int) gimR3DebugWrite(PVM pVM, void *pvWrite, size_t *pcbWrite);
124#endif /* IN_RING3 */
125
126/** @} */
127
128RT_C_DECLS_END
129
130#endif /* !VMM_INCLUDED_SRC_include_GIMInternal_h */
131
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