VirtualBox

source: vbox/trunk/include/VBox/vmm/gvm.h@ 53420

Last change on this file since 53420 was 44528, checked in by vboxsync, 12 years ago

header (C) fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1/* $Id: gvm.h 44528 2013-02-04 14:27:54Z vboxsync $ */
2/** @file
3 * GVM - The Global VM Data.
4 */
5
6/*
7 * Copyright (C) 2007-2011 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 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27
28#ifndef ___VBox_vmm_gvm_h
29#define ___VBox_vmm_gvm_h
30
31#include <VBox/types.h>
32#include <iprt/thread.h>
33
34
35/** @defgroup grp_gvm GVMCPU - The Global VMCPU Data
36 * @{
37 */
38
39typedef struct GVMCPU
40{
41 /** VCPU id (0 - (pVM->cCpus - 1). */
42 VMCPUID idCpu;
43
44 /** Handle to the EMT thread. */
45 RTNATIVETHREAD hEMT;
46
47 /** The GVMM per vcpu data. */
48 union
49 {
50#ifdef ___GVMMR0Internal_h
51 struct GVMMPERVCPU s;
52#endif
53 uint8_t padding[64];
54 } gvmm;
55} GVMCPU;
56/** Pointer to the GVMCPU data. */
57typedef GVMCPU *PGVMCPU;
58
59/** @} */
60
61/** @defgroup grp_gvm GVM - The Global VM Data
62 * @{
63 */
64
65/**
66 * The Global VM Data.
67 *
68 * This is a ring-0 only structure where we put items we don't need to
69 * share with ring-3 or GC, like for instance various RTR0MEMOBJ handles.
70 *
71 * Unlike VM, there are no special alignment restrictions here. The
72 * paddings are checked by compile time assertions.
73 */
74typedef struct GVM
75{
76 /** Magic / eye-catcher (GVM_MAGIC). */
77 uint32_t u32Magic;
78 /** The global VM handle for this VM. */
79 uint32_t hSelf;
80 /** The ring-0 mapping of the VM structure. */
81 PVM pVM;
82 /** Number of Virtual CPUs, i.e. how many entries there are in aCpus.
83 * Same same as VM::cCpus. */
84 uint32_t cCpus;
85 uint32_t padding;
86
87 /** The GVMM per vm data. */
88 union
89 {
90#ifdef ___GVMMR0Internal_h
91 struct GVMMPERVM s;
92#endif
93 uint8_t padding[256];
94 } gvmm;
95
96 /** The GMM per vm data. */
97 union
98 {
99#ifdef ___GMMR0Internal_h
100 struct GMMPERVM s;
101#endif
102 uint8_t padding[512];
103 } gmm;
104
105 /** The RAWPCIVM per vm data. */
106 union
107 {
108#ifdef ___VBox_rawpci_h
109 struct RAWPCIPERVM s;
110#endif
111 uint8_t padding[64];
112 } rawpci;
113
114
115 /** GVMCPU array for the configured number of virtual CPUs. */
116 GVMCPU aCpus[1];
117} GVM;
118
119/** The GVM::u32Magic value (Wayne Shorter). */
120#define GVM_MAGIC 0x19330825
121
122/** @} */
123
124#endif
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