1 | /* $Id: GIMInternal.h 54819 2015-03-17 17:58:30Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * GIM - Internal header file.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2014 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 "GIMHvInternal.h"
|
---|
23 | #include "GIMKvmInternal.h"
|
---|
24 | #include "GIMMinimalInternal.h"
|
---|
25 |
|
---|
26 | RT_C_DECLS_BEGIN
|
---|
27 |
|
---|
28 | /** @defgroup grp_gim_int Internal
|
---|
29 | * @ingroup grp_gim
|
---|
30 | * @internal
|
---|
31 | * @{
|
---|
32 | */
|
---|
33 |
|
---|
34 | /** The saved state version. */
|
---|
35 | #define GIM_SAVED_STATE_VERSION 1
|
---|
36 |
|
---|
37 | /**
|
---|
38 | * GIM VM Instance data.
|
---|
39 | * Changes to this must checked against the padding of the gim union in VM!
|
---|
40 | */
|
---|
41 | typedef 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 | /** Pointer to the GIM device - ring-3 context. */
|
---|
49 | R3PTRTYPE(PPDMDEVINS) pDevInsR3;
|
---|
50 | #if 0
|
---|
51 | /** Pointer to the provider's ring-3 hypercall handler. */
|
---|
52 | R3PTRTYPE(PFNGIMHYPERCALL) pfnHypercallR3;
|
---|
53 | /** Pointer to the provider's ring-0 hypercall handler. */
|
---|
54 | R0PTRTYPE(PFNGIMHYPERCALL) pfnHypercallR0;
|
---|
55 | /** Pointer to the provider's raw-mode context hypercall handler. */
|
---|
56 | RCPTRTYPE(PFNGIMHYPERCALL) pfnHypercallRC;
|
---|
57 |
|
---|
58 | /** Pointer to the provider's ring-3 MSR-read handler. */
|
---|
59 | R3PTRTYPE(PFNGIMRDMSR) pfnReadMsrR3;
|
---|
60 | /** Pointer to the provider's ring-0 MSR-read handler. */
|
---|
61 | R0PTRTYPE(PFNGIMRDMSR) pfnReadMsrR0;
|
---|
62 | /** Pointer to the provider's raw-mode context MSR-read handler. */
|
---|
63 | RCPTRTYPE(PFNGIMRDMSR) pfnReadMsrRC;
|
---|
64 |
|
---|
65 | /** Pointer to the provider's ring-3 MSR-read handler. */
|
---|
66 | R3PTRTYPE(PFNGIMWDMSR) pfnWriteMsrR3;
|
---|
67 | /** Pointer to the provider's ring-0 MSR-read handler. */
|
---|
68 | R0PTRTYPE(PFNGIMWDMSR) pfnWriteMsrRR0;
|
---|
69 | /** Pointer to the provider's raw-mode context MSR-read handler. */
|
---|
70 | RCPTRTYPE(PFNGIMWDMSR) pfnWriteMsrRRC;
|
---|
71 | #endif
|
---|
72 |
|
---|
73 | union
|
---|
74 | {
|
---|
75 | GIMHV Hv;
|
---|
76 | GIMKVM Kvm;
|
---|
77 | } u;
|
---|
78 | } GIM;
|
---|
79 | /** Pointer to GIM VM instance data. */
|
---|
80 | typedef GIM *PGIM;
|
---|
81 |
|
---|
82 |
|
---|
83 | /**
|
---|
84 | * GIM VMCPU Instance data.
|
---|
85 | */
|
---|
86 | typedef struct GIMCPU
|
---|
87 | {
|
---|
88 | union
|
---|
89 | {
|
---|
90 | GIMKVMCPU KvmCpu;
|
---|
91 | } u;
|
---|
92 | } GIMCPU;
|
---|
93 | /** Pointer to GIM VMCPU instance data. */
|
---|
94 | typedef GIMCPU *PGIMCPU;
|
---|
95 |
|
---|
96 | #ifdef IN_RING3
|
---|
97 | VMMR3_INT_DECL(int) GIMR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion);
|
---|
98 | VMMR3_INT_DECL(int) GIMR3Mmio2Map(PVM pVM, PGIMMMIO2REGION pRegion, RTGCPHYS GCPhysRegion);
|
---|
99 | VMMR3_INT_DECL(int) GIMR3Mmio2HandlerPhysicalRegister(PVM pVM, PGIMMMIO2REGION pRegion);
|
---|
100 | VMMR3_INT_DECL(int) GIMR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion);
|
---|
101 | #endif /* IN_RING3 */
|
---|
102 |
|
---|
103 | /** @} */
|
---|
104 |
|
---|
105 | RT_C_DECLS_END
|
---|
106 |
|
---|
107 | #endif
|
---|
108 |
|
---|