VirtualBox

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

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

make the headers build cleanly again

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1/* $Id: uvm.h 21515 2009-07-12 19:37:42Z vboxsync $ */
2/** @file
3 * GVM - The Global VM Data. (VMM)
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#include <VBox/types.h>
36
37
38/**
39 * Per virtual CPU ring-3 (user mode) data.
40 */
41typedef struct UVMCPU
42{
43 /** Pointer to the UVM structure. */
44 PUVM pUVM;
45 /** Pointer to the VM structure. */
46 PVM pVM;
47 /** Pointer to the VMCPU structure. */
48 PVMCPU pVCpu;
49 /** The virtual CPU ID. */
50 RTCPUID idCpu;
51
52 /** The VM internal data. */
53 struct
54 {
55#ifdef ___VMInternal_h
56 struct VMINTUSERPERVMCPU s;
57#endif
58 uint8_t padding[768];
59 } vm;
60} UVMCPU;
61
62
63/**
64 * The ring-3 (user mode) VM structure.
65 *
66 * This structure is similar to VM and GVM except that it resides in swappable
67 * user memory. The main purpose is to assist bootstrapping, where it allows us
68 * to start EMT much earlier and gives PDMLdr somewhere to put it's VMMR0 data.
69 * It is also a nice place to put big things that are user mode only.
70 */
71typedef struct UVM
72{
73 /** Magic / eye-catcher (UVM_MAGIC). */
74 uint32_t u32Magic;
75 /** The number of virtual CPUs. */
76 uint32_t cCpus;
77 /** The ring-3 mapping of the shared VM structure. */
78 PVM pVM;
79 /** Pointer to the next VM.
80 * We keep a per process list of VM for the event that a process could
81 * contain more than one VM.
82 * @todo move this into vm.s!
83 */
84 struct UVM *pNext;
85
86 /** The VM internal data. */
87 struct
88 {
89#ifdef ___VMInternal_h
90 struct VMINTUSERPERVM s;
91#endif
92 uint8_t padding[768];
93 } vm;
94
95 /** The MM data. */
96 struct
97 {
98#ifdef ___MMInternal_h
99 struct MMUSERPERVM s;
100#endif
101 uint8_t padding[32];
102 } mm;
103
104 /** The PDM data. */
105 struct
106 {
107#ifdef ___PDMInternal_h
108 struct PDMUSERPERVM s;
109#endif
110 uint8_t padding[32];
111 } pdm;
112
113 /** The STAM data. */
114 struct
115 {
116#ifdef ___STAMInternal_h
117 struct STAMUSERPERVM s;
118#endif
119 uint8_t padding[256];
120 } stam;
121
122 /** Per virtual CPU data. */
123 UVMCPU aCpus[1];
124} UVM;
125
126/** The UVM::u32Magic value (Brad Mehldau). */
127#define UVM_MAGIC 0x19700823
128
129#endif
130
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