VirtualBox

source: vbox/trunk/include/VBox/uvm.h@ 8006

Last change on this file since 8006 was 6796, checked in by vboxsync, 16 years ago

Fixed init problems wrt. VM ownership by implementing the UVM structure (U = user mode) and moving problematic ring-3 stuff over there (emt+reqs, r3heap, stam, loader[VMMR0.r0]). Big change, but it works fine here... :-)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1/* $Id: uvm.h 6796 2008-02-04 18:19:58Z vboxsync $ */
2/** @file
3 * GVM - The Global VM Data.
4 */
5
6/*
7 * Copyright (C) 2007 innotek 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 (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_uvm_h
29#define ___VBox_uvm_h
30
31
32#include <VBox/types.h>
33
34/**
35 * The ring-3 (user mode) VM structure.
36 *
37 * This structure is similar to VM and GVM except that it resides in swappable
38 * user memory. The main purpose is to assist bootstrapping, where it allows us
39 * to start EMT much earlier and gives PDMLdr somewhere to put it's VMMR0 data.
40 * It is also a nice place to put big things that are user mode only.
41 */
42typedef struct UVM
43{
44 /** Magic / eye-catcher (UVM_MAGIC). */
45 uint32_t u32Magic;
46 uint32_t uReserved; /**< alignment */
47 /** The ring-3 mapping of the shared VM structure. */
48 PVM pVM;
49 /** Pointer to the next VM.
50 * We keep a per process list of VM for the event that a process could
51 * contain more than one VM.
52 * @todo move this into vm.s!
53 */
54 struct UVM *pNext;
55
56 /** The VM internal data. */
57 struct
58 {
59#ifdef ___VMInternal_h
60 struct VMINTUSERPERVM s;
61#endif
62 uint8_t padding[768];
63 } vm;
64
65 /** The MM data. */
66 struct
67 {
68#ifdef ___MMInternal_h
69 struct MMUSERPERVM s;
70#endif
71 uint8_t padding[32];
72 } mm;
73
74 /** The PDM data. */
75 struct
76 {
77#ifdef ___PDMInternal_h
78 struct PDMUSERPERVM s;
79#endif
80 uint8_t padding[32];
81 } pdm;
82
83 /** The STAM data. */
84 struct
85 {
86#ifdef ___STAMInternal_h
87 struct STAMUSERPERVM s;
88#endif
89 uint8_t padding[256];
90 } stam;
91
92} UVM;
93
94/** The UVM::u32Magic value (Brad Mehldau). */
95#define UVM_MAGIC 0x19700823
96
97#endif
98
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use