VirtualBox

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

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

UVM splitup for SMP guests. Global and local request packets supported.

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