1 | /* $Id: uvm.h 8155 2008-04-18 15:16:47Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * GVM - The Global VM Data.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2007 Sun Microsystems, Inc.
|
---|
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 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
27 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
28 | * additional information or have any questions.
|
---|
29 | */
|
---|
30 |
|
---|
31 |
|
---|
32 | #ifndef ___VBox_uvm_h
|
---|
33 | #define ___VBox_uvm_h
|
---|
34 |
|
---|
35 |
|
---|
36 | #include <VBox/types.h>
|
---|
37 |
|
---|
38 | /**
|
---|
39 | * The ring-3 (user mode) VM structure.
|
---|
40 | *
|
---|
41 | * This structure is similar to VM and GVM except that it resides in swappable
|
---|
42 | * user memory. The main purpose is to assist bootstrapping, where it allows us
|
---|
43 | * to start EMT much earlier and gives PDMLdr somewhere to put it's VMMR0 data.
|
---|
44 | * It is also a nice place to put big things that are user mode only.
|
---|
45 | */
|
---|
46 | typedef struct UVM
|
---|
47 | {
|
---|
48 | /** Magic / eye-catcher (UVM_MAGIC). */
|
---|
49 | uint32_t u32Magic;
|
---|
50 | uint32_t uReserved; /**< alignment */
|
---|
51 | /** The ring-3 mapping of the shared VM structure. */
|
---|
52 | PVM pVM;
|
---|
53 | /** Pointer to the next VM.
|
---|
54 | * We keep a per process list of VM for the event that a process could
|
---|
55 | * contain more than one VM.
|
---|
56 | * @todo move this into vm.s!
|
---|
57 | */
|
---|
58 | struct UVM *pNext;
|
---|
59 |
|
---|
60 | /** The VM internal data. */
|
---|
61 | struct
|
---|
62 | {
|
---|
63 | #ifdef ___VMInternal_h
|
---|
64 | struct VMINTUSERPERVM s;
|
---|
65 | #endif
|
---|
66 | uint8_t padding[768];
|
---|
67 | } vm;
|
---|
68 |
|
---|
69 | /** The MM data. */
|
---|
70 | struct
|
---|
71 | {
|
---|
72 | #ifdef ___MMInternal_h
|
---|
73 | struct MMUSERPERVM s;
|
---|
74 | #endif
|
---|
75 | uint8_t padding[32];
|
---|
76 | } mm;
|
---|
77 |
|
---|
78 | /** The PDM data. */
|
---|
79 | struct
|
---|
80 | {
|
---|
81 | #ifdef ___PDMInternal_h
|
---|
82 | struct PDMUSERPERVM s;
|
---|
83 | #endif
|
---|
84 | uint8_t padding[32];
|
---|
85 | } pdm;
|
---|
86 |
|
---|
87 | /** The STAM data. */
|
---|
88 | struct
|
---|
89 | {
|
---|
90 | #ifdef ___STAMInternal_h
|
---|
91 | struct STAMUSERPERVM s;
|
---|
92 | #endif
|
---|
93 | uint8_t padding[256];
|
---|
94 | } stam;
|
---|
95 |
|
---|
96 | } UVM;
|
---|
97 |
|
---|
98 | /** The UVM::u32Magic value (Brad Mehldau). */
|
---|
99 | #define UVM_MAGIC 0x19700823
|
---|
100 |
|
---|
101 | #endif
|
---|
102 |
|
---|