1 | /* $Id: gvm.h 5167 2007-10-05 13:33:36Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * GVM - The Global VM Data.
|
---|
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 |
|
---|
20 | #ifndef ___VBox_gvm_h
|
---|
21 | #define ___VBox_gvm_h
|
---|
22 |
|
---|
23 | #include <VBox/types.h>
|
---|
24 | #include <iprt/thread.h>
|
---|
25 |
|
---|
26 |
|
---|
27 | /** @defgroup grp_gvm GVM - The Global VM Data
|
---|
28 | * @{
|
---|
29 | */
|
---|
30 |
|
---|
31 | /**
|
---|
32 | * The Global VM Data.
|
---|
33 | *
|
---|
34 | * This is a ring-0 only structure where we put items we don't need to
|
---|
35 | * share with ring-3 or GC, like for instance various RTR0MEMOBJ handles.
|
---|
36 | *
|
---|
37 | * Unlike VM, there are no special alignment restrictions here. The
|
---|
38 | * paddings are checked by compile time assertions.
|
---|
39 | */
|
---|
40 | typedef struct GVM
|
---|
41 | {
|
---|
42 | /** Magic / eye-catcher (GVM_MAGIC). */
|
---|
43 | uint32_t u32Magic;
|
---|
44 | /** The global VM handle for this VM. */
|
---|
45 | uint32_t hSelf;
|
---|
46 | /** Handle to the EMT thread. */
|
---|
47 | RTNATIVETHREAD hEMT;
|
---|
48 | /** The ring-0 mapping of the VM structure. */
|
---|
49 | PVM pVM;
|
---|
50 |
|
---|
51 | /** The GVMM per vm data. */
|
---|
52 | struct
|
---|
53 | {
|
---|
54 | #ifdef ___GVMMR0Internal_h
|
---|
55 | struct GVMMPERVM s;
|
---|
56 | #endif
|
---|
57 | uint8_t padding[128];
|
---|
58 | } gvmm;
|
---|
59 |
|
---|
60 | /** The GMM per vm data. */
|
---|
61 | struct
|
---|
62 | {
|
---|
63 | #ifdef ___GMMR0Internal_h
|
---|
64 | struct GMMPERVM s;
|
---|
65 | #endif
|
---|
66 | uint8_t padding[256];
|
---|
67 | } gmm;
|
---|
68 |
|
---|
69 | } GVM;
|
---|
70 |
|
---|
71 | /** The GVM::u32Magic value (Wayne Shorter). */
|
---|
72 | #define GVM_MAGIC 0x19330825
|
---|
73 |
|
---|
74 | /** @} */
|
---|
75 |
|
---|
76 | #endif
|
---|