VirtualBox

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

Last change on this file since 51643 was 51643, checked in by vboxsync, 11 years ago

VMM/GIM: More bits for Hyper-V implementation.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/* $Id: GIMInternal.h 51643 2014-06-18 11:06:06Z 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/** The saved state version. */
33#define GIM_SSM_VERSION 1
34
35/**
36 * GIM VM Instance data.
37 * Changes to this must checked against the padding of the gim union in VM!
38 */
39typedef struct GIM
40{
41 /** Whether GIM is enabled for this VM or not. */
42 bool fEnabled;
43 /** The provider that is active for this VM. */
44 GIMPROVIDERID enmProviderId;
45 /** The interface 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
77 /** @todo KVM and others. */
78 } u;
79} GIM;
80/** Pointer to GIM VM instance data. */
81typedef GIM *PGIM;
82
83
84/**
85 * GIM VMCPU Instance data.
86 */
87typedef struct GIMCPU
88{
89} GIMCPU;
90/** Pointer to GIM VMCPU instance data. */
91typedef GIMCPU *PGIMCPU;
92
93#ifdef IN_RING3
94VMMR3_INT_DECL(int) GIMR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion);
95VMMR3_INT_DECL(int) GIMR3Mmio2Map(PVM pVM, PGIMMMIO2REGION pRegion, RTGCPHYS GCPhysRegion);
96VMMR3_INT_DECL(int) GIMR3Mmio2HandlerPhysicalRegister(PVM pVM, PGIMMMIO2REGION pRegion);
97VMMR3_INT_DECL(int) GIMR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion);
98#endif /* IN_RING3 */
99
100/** @} */
101
102RT_C_DECLS_END
103
104#endif /* ___GIMInternal_h */
105
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette