VirtualBox

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

Last change on this file since 77481 was 76585, checked in by vboxsync, 6 years ago

*: scm --fix-header-guard-endif

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