VirtualBox

source: vbox/trunk/include/VBox/vmm/gim.h@ 51182

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

VMM/GIM: Introduce the Minimal provider.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/** @file
2 * GIM - Guest Interface Manager.
3 */
4
5/*
6 * Copyright (C) 2014 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef ___VBox_vmm_gim_h
27#define ___VBox_vmm_gim_h
28
29#include <VBox/cdefs.h>
30#include <VBox/types.h>
31#include <VBox/param.h>
32
33RT_C_DECLS_BEGIN
34
35/** @defgroup grp_gim The Guest Interface Manager API
36 * @{
37 */
38
39/**
40 * Providers identifiers.
41 */
42typedef enum GIMPROVIDER
43{
44 /** None. */
45 GIMPROVIDER_NONE = 0,
46 /** Minimal. */
47 GIMPROVIDER_MINIMAL,
48 /** Microsoft Hyper-V. */
49 GIMPROVIDER_HYPERV,
50 /** Linux KVM Interface. */
51 GIMPROVIDER_KVM,
52 /** Ensure 32-bit type. */
53 GIMPROVIDER_32BIT_HACK = 0x7fffffff
54} GIMPROVIDER;
55
56
57/**
58 * A GIM Hypercall handler.
59 *
60 * @param pVM Pointer to the VMCPU.
61 * @param pCtx Pointer to the guest-CPU context.
62 */
63typedef DECLCALLBACK(int) FNGIMHYPERCALL(PVMCPU pVCpu, PCPUMCTX pCtx);
64/** Pointer to a GIM hypercall handler. */
65typedef FNGIMHYPERCALL *PFNGIMHYPERCALL;
66
67#ifdef IN_RC
68/** @defgroup grp_gim_rc The GIM Raw-mode Context API
69 * @ingroup grp_gim
70 * @{
71 */
72/** @} */
73#endif /* IN_RC */
74
75#ifdef IN_RING0
76/** @defgroup grp_gim_r0 The GIM Host Context Ring-0 API
77 * @ingroup grp_gim
78 * @{
79 */
80
81/** @} */
82#endif /* IN_RING0 */
83
84
85#ifdef IN_RING3
86/** @defgroup grp_gim_r3 The GIM Host Context Ring-3 API
87 * @ingroup grp_gim
88 * @{
89 */
90VMMR3_INT_DECL(int) GIMR3Init(PVM pVM);
91VMMR3_INT_DECL(int) GIMR3Term(PVM pVM);
92/** @} */
93#endif /* IN_RING3 */
94
95
96/**
97 * Checks whether GIM is being used by this VM.
98 *
99 * @retval @c true if used.
100 * @retval @c false if no GIM provider ("none") is used.
101 *
102 * @param pVM Pointer to the VM.
103 * @internal
104 */
105VMMDECL(bool) GIMIsEnabled(PVM pVM);
106
107/** @} */
108
109RT_C_DECLS_END
110
111#endif
112
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