VirtualBox

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

Last change on this file since 94249 was 93650, checked in by vboxsync, 3 years ago

VMM/PGM,*: Split the physical access handler type registration into separate ring-0 and ring-3 steps, expanding the type to 64-bit. bugref:10094

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1/* $Id: GIMInternal.h 93650 2022-02-08 10:43:53Z vboxsync $ */
2/** @file
3 * GIM - Internal header file.
4 */
5
6/*
7 * Copyright (C) 2014-2022 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
54 /** Pointer to the GIM device - R3 ptr. */
55 R3PTRTYPE(PPDMDEVINS) pDevInsR3;
56 /** The debug struct - R3 ptr. */
57 R3PTRTYPE(PGIMDEBUG) pDbgR3;
58
59 /** The provider specific data. */
60 union
61 {
62 GIMHV Hv;
63 GIMKVM Kvm;
64 } u;
65
66 /** Number of hypercalls initiated. */
67 STAMCOUNTER StatHypercalls;
68 /** Debug packets sent. */
69 STAMCOUNTER StatDbgXmit;
70 /** Debug bytes sent. */
71 STAMCOUNTER StatDbgXmitBytes;
72 /** Debug packets received. */
73 STAMCOUNTER StatDbgRecv;
74 /** Debug bytes received. */
75 STAMCOUNTER StatDbgRecvBytes;
76} GIM;
77/** Pointer to GIM VM instance data. */
78typedef GIM *PGIM;
79
80/**
81 * GIM VMCPU Instance data.
82 */
83typedef struct GIMCPU
84{
85 union
86 {
87 GIMKVMCPU KvmCpu;
88 GIMHVCPU HvCpu;
89 } u;
90} GIMCPU;
91/** Pointer to GIM VMCPU instance data. */
92typedef GIMCPU *PGIMCPU;
93
94/**
95 * Callback when a debug buffer read has completed and before signalling the next
96 * read.
97 *
98 * @param pVM The cross context VM structure.
99 */
100typedef DECLCALLBACKTYPE(void, FNGIMDEBUGBUFREADCOMPLETED,(PVM pVM));
101/** Pointer to GIM debug buffer read completion callback. */
102typedef FNGIMDEBUGBUFREADCOMPLETED *PFNGIMDEBUGBUFREADCOMPLETED;
103
104#ifdef IN_RING3
105#if 0
106VMMR3_INT_DECL(int) gimR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion);
107VMMR3_INT_DECL(int) gimR3Mmio2Map(PVM pVM, PGIMMMIO2REGION pRegion, RTGCPHYS GCPhysRegion);
108VMMR3_INT_DECL(int) gimR3Mmio2HandlerPhysicalRegister(PVM pVM, PGIMMMIO2REGION pRegion);
109VMMR3_INT_DECL(int) gimR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion);
110#endif
111
112VMMR3_INT_DECL(int) gimR3DebugRead(PVM pVM, void *pvRead, size_t *pcbRead, PFNGIMDEBUGBUFREADCOMPLETED pfnReadComplete);
113VMMR3_INT_DECL(int) gimR3DebugWrite(PVM pVM, void *pvWrite, size_t *pcbWrite);
114#endif /* IN_RING3 */
115
116/** @} */
117
118RT_C_DECLS_END
119
120#endif /* !VMM_INCLUDED_SRC_include_GIMInternal_h */
121
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