VirtualBox

source: vbox/trunk/include/VBox/gvmm.h@ 5043

Last change on this file since 5043 was 5031, checked in by vboxsync, 17 years ago

Use GVMMR3CreateVM. the new GVM structure is a ring-0 only VM structure. the old VM structure is the shared ring-0, ring-3 and GC VM structure.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1/* $Id: gvmm.h 5031 2007-09-25 22:27:37Z vboxsync $ */
2/** @file
3 * GVMM - The Global VM Manager.
4 */
5
6/*
7 * Copyright (C) 2007 InnoTek Systemberatung GmbH
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 as published by the Free Software Foundation,
13 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 * distribution. VirtualBox OSE is distributed in the hope that it will
15 * be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 */
18
19#ifndef ___VBox_gvmm_h
20#define ___VBox_gvmm_h
21
22#include <VBox/cdefs.h>
23#include <VBox/types.h>
24#include <VBox/sup.h>
25
26/** @defgroup grp_GVMM GVMM - The Global VM Manager.
27 * @{
28 */
29
30/** @def IN_GVMM_R0
31 * Used to indicate whether we're inside the same link module as the ring 0
32 * part of the Global VM Manager or not.
33 */
34/** @def GVMMR0DECL
35 * Ring 0 VM export or import declaration.
36 * @param type The return type of the function declaration.
37 */
38#ifdef IN_GVMM_R0
39# define GVMMR0DECL(type) DECLEXPORT(type) VBOXCALL
40#else
41# define GVMMR0DECL(type) DECLIMPORT(type) VBOXCALL
42#endif
43
44/** @def NIL_GVM_HANDLE
45 * The nil GVM VM handle value (VM::hSelf).
46 */
47#define NIL_GVM_HANDLE 0
48
49GVMMR0DECL(int) GVMMR0Init(void);
50GVMMR0DECL(void) GVMMR0Term(void);
51
52GVMMR0DECL(int) GVMMR0CreateVM(PSUPDRVSESSION pSession, PVM *ppVM);
53GVMMR0DECL(int) GVMMR0CreateVMReq(PSUPVMMR0REQHDR pReqHdr);
54GVMMR0DECL(int) GVMMR0DestroyVM(PVM pVM);
55GVMMR0DECL(int) GVMMR0AssociateEMTWithVM(PVM pVM);
56GVMMR0DECL(int) GVMMR0DisassociateEMTFromVM(PVM pVM);
57GVMMR0DECL(PGVM) GVMMR0ByHandle(uint32_t hGVM);
58GVMMR0DECL(PGVM) GVMMR0ByVM(PVM pVM);
59GVMMR0DECL(PVM) GVMMR0GetVMByHandle(uint32_t hGVM);
60GVMMR0DECL(PVM) GVMMR0GetVMByEMT(RTNATIVETHREAD hEMT);
61
62/**
63 * Request packet for calling GVMMR0CreateVM.
64 */
65typedef struct GVMMCREATEVMREQ
66{
67 /** The request header. */
68 SUPVMMR0REQHDR Hdr;
69 /** The support driver session. (IN) */
70 PSUPDRVSESSION pSession;
71 /** Pointer to the ring-3 mapping of the shared VM structure on return. (OUT) */
72 PVMR3 pVMR3;
73 /** Pointer to the ring-0 mapping of the shared VM structure on return. (OUT) */
74 PVMR0 pVMR0;
75} GVMMCREATEVMREQ;
76/** Pointer to a GVMMR0CreateVM request packet. */
77typedef GVMMCREATEVMREQ *PGVMMCREATEVMREQ;
78
79
80/** @} */
81
82#endif
83
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