VirtualBox

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

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

UVM updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1/* $Id: uvm.h 13751 2008-11-03 14:53:11Z 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 * Per virtual CPU ring-3 (user mode) data.
40 */
41typedef struct UVMCPU
42{
43 uint32_t uFiller;
44} UVMCPU;
45
46/**
47 * The ring-3 (user mode) VM structure.
48 *
49 * This structure is similar to VM and GVM except that it resides in swappable
50 * user memory. The main purpose is to assist bootstrapping, where it allows us
51 * to start EMT much earlier and gives PDMLdr somewhere to put it's VMMR0 data.
52 * It is also a nice place to put big things that are user mode only.
53 */
54typedef struct UVM
55{
56 /** Magic / eye-catcher (UVM_MAGIC). */
57 uint32_t u32Magic;
58 uint32_t uReserved; /**< alignment */
59 /** The ring-3 mapping of the shared VM structure. */
60 PVM pVM;
61 /** Pointer to the next VM.
62 * We keep a per process list of VM for the event that a process could
63 * contain more than one VM.
64 * @todo move this into vm.s!
65 */
66 struct UVM *pNext;
67
68 /** The VM internal data. */
69 struct
70 {
71#ifdef ___VMInternal_h
72 struct VMINTUSERPERVM s;
73#endif
74 uint8_t padding[768];
75 } vm;
76
77 /** The MM data. */
78 struct
79 {
80#ifdef ___MMInternal_h
81 struct MMUSERPERVM s;
82#endif
83 uint8_t padding[32];
84 } mm;
85
86 /** The PDM data. */
87 struct
88 {
89#ifdef ___PDMInternal_h
90 struct PDMUSERPERVM s;
91#endif
92 uint8_t padding[32];
93 } pdm;
94
95 /** The STAM data. */
96 struct
97 {
98#ifdef ___STAMInternal_h
99 struct STAMUSERPERVM s;
100#endif
101 uint8_t padding[256];
102 } stam;
103
104 /* Per virtual CPU data. */
105 UVMCPU aCpu[1];
106} UVM;
107
108/** The UVM::u32Magic value (Brad Mehldau). */
109#define UVM_MAGIC 0x19700823
110
111#endif
112
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use