VirtualBox

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

Last change on this file since 51560 was 51560, checked in by vboxsync, 10 years ago

VMM/GIM: Mapping of GIM MMIO2 regions and Hyper-V provider work.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1/* $Id: GIMInternal.h 51560 2014-06-06 05:17:02Z 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
24RT_C_DECLS_BEGIN
25
26/** @defgroup grp_gim_int Internal
27 * @ingroup grp_gim
28 * @internal
29 * @{
30 */
31
32/**
33 * GIM VM Instance data.
34 * Changes to this must checked against the padding of the gim union in VM!
35 */
36typedef struct GIM
37{
38 /** Whether GIM is enabled for this VM or not. */
39 bool fEnabled;
40 /** The provider that is active for this VM. */
41 GIMPROVIDERID enmProviderId;
42 /** The interface version. */
43 uint32_t u32Version;
44
45 /** Pointer to the GIM device - ring-3 context. */
46 R3PTRTYPE(PPDMDEVINS) pDevInsR3;
47#if 0
48 /** Pointer to the provider's ring-3 hypercall handler. */
49 R3PTRTYPE(PFNGIMHYPERCALL) pfnHypercallR3;
50 /** Pointer to the provider's ring-0 hypercall handler. */
51 R0PTRTYPE(PFNGIMHYPERCALL) pfnHypercallR0;
52 /** Pointer to the provider's raw-mode context hypercall handler. */
53 RCPTRTYPE(PFNGIMHYPERCALL) pfnHypercallRC;
54
55 /** Pointer to the provider's ring-3 MSR-read handler. */
56 R3PTRTYPE(PFNGIMRDMSR) pfnReadMsrR3;
57 /** Pointer to the provider's ring-0 MSR-read handler. */
58 R0PTRTYPE(PFNGIMRDMSR) pfnReadMsrR0;
59 /** Pointer to the provider's raw-mode context MSR-read handler. */
60 RCPTRTYPE(PFNGIMRDMSR) pfnReadMsrRC;
61
62 /** Pointer to the provider's ring-3 MSR-read handler. */
63 R3PTRTYPE(PFNGIMWDMSR) pfnWriteMsrR3;
64 /** Pointer to the provider's ring-0 MSR-read handler. */
65 R0PTRTYPE(PFNGIMWDMSR) pfnWriteMsrRR0;
66 /** Pointer to the provider's raw-mode context MSR-read handler. */
67 RCPTRTYPE(PFNGIMWDMSR) pfnWriteMsrRRC;
68#endif
69
70 union
71 {
72 GIMHV Hv;
73
74 /** @todo KVM and others. */
75 } u;
76} GIM;
77/** Pointer to GIM VM instance data. */
78typedef GIM *PGIM;
79
80
81/**
82 * GIM VMCPU Instance data.
83 */
84typedef struct GIMCPU
85{
86} GIMCPU;
87/** Pointer to GIM VMCPU instance data. */
88typedef GIMCPU *PGIMCPU;
89
90#ifdef IN_RING3
91VMM_INT_DECL(int) GIMR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion);
92VMM_INT_DECL(int) GIMR3Mmio2Map(PVM pVM, PGIMMMIO2REGION pRegion, RTGCPHYS GCPhysRegion, const char *pszDesc);
93#endif /* IN_RING3 */
94
95/** @} */
96
97RT_C_DECLS_END
98
99#endif /* ___GIMInternal_h */
100
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