VirtualBox

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

Last change on this file since 76553 was 76553, checked in by vboxsync, 5 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
RevLine 
[50953]1/* $Id: GIMInternal.h 76553 2019-01-01 01:45:53Z vboxsync $ */
2/** @file
3 * GIM - Internal header file.
4 */
5
6/*
[76553]7 * Copyright (C) 2014-2019 Oracle Corporation
[50953]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
[76543]20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
[50953]23
24#include <VBox/vmm/gim.h>
[55493]25#include <VBox/vmm/pgm.h>
[51560]26#include "GIMHvInternal.h"
[54819]27#include "GIMKvmInternal.h"
[51797]28#include "GIMMinimalInternal.h"
[50953]29
30RT_C_DECLS_BEGIN
31
32/** @defgroup grp_gim_int Internal
33 * @ingroup grp_gim
34 * @internal
35 * @{
36 */
37
[51643]38/** The saved state version. */
[52761]39#define GIM_SAVED_STATE_VERSION 1
[51643]40
[50953]41/**
42 * GIM VM Instance data.
43 */
44typedef struct GIM
45{
46 /** The provider that is active for this VM. */
[51333]47 GIMPROVIDERID enmProviderId;
[52009]48 /** The interface implementation version. */
[51333]49 uint32_t u32Version;
50
[55493]51 /** Physical access handler type for semi-read-only MMIO2 memory. Lazy creation. */
52 PGMPHYSHANDLERTYPE hSemiReadOnlyMmio2Handler;
53 /** Alignment padding. */
54 uint32_t u32Padding;
55
[57989]56 /** Pointer to the GIM device - R3 ptr. */
[51560]57 R3PTRTYPE(PPDMDEVINS) pDevInsR3;
[58390]58 /** The debug struct - R3 ptr. */
59 R3PTRTYPE(PGIMDEBUG) pDbgR3;
[50953]60
[58390]61 /** The provider specific data. */
[50953]62 union
63 {
[55037]64 GIMHV Hv;
[54819]65 GIMKVM Kvm;
[50953]66 } u;
[58390]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;
[50953]78} GIM;
79/** Pointer to GIM VM instance data. */
80typedef GIM *PGIM;
81
82/**
83 * GIM VMCPU Instance data.
84 */
85typedef struct GIMCPU
86{
[54819]87 union
88 {
89 GIMKVMCPU KvmCpu;
[58283]90 GIMHVCPU HvCpu;
[54819]91 } u;
[50953]92} GIMCPU;
93/** Pointer to GIM VMCPU instance data. */
94typedef GIMCPU *PGIMCPU;
95
[58390]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
[51560]106#ifdef IN_RING3
[61771]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
[57989]113
[61771]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);
[51560]116#endif /* IN_RING3 */
[50953]117
118/** @} */
119
120RT_C_DECLS_END
121
[52765]122#endif
[50953]123
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use