Skip to content

Commit 0845a58

Browse files
author
vboxsync
committed
Word and diagram wrt contexts.
git-svn-id: http://www.virtualbox.org/svn/vbox/trunk@41857 cfe28804-0f27-0410-a406-dd0f0b0b656f
1 parent 1747a1a commit 0845a58

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

Doxyfile.Core

+2-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ IMAGE_PATH = \
327327
doc \
328328
doc/tg/Networking-diagrams \
329329
doc/tg/USB-diagrams \
330-
doc/tg/diagrams
330+
doc/tg/diagrams \
331+
doc/VMM
331332
INPUT_FILTER =
332333
FILTER_PATTERNS =
333334
FILTER_SOURCE_FILES = NO

doc/VBox-doc.c

+42-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
/*
7-
* Copyright (C) 2006-2007 Oracle Corporation
7+
* Copyright (C) 2006-2012 Oracle Corporation
88
*
99
* This file is part of VirtualBox Open Source Edition (OSE), as
1010
* available from http://www.virtualbox.org. This file is free software;
@@ -135,10 +135,51 @@
135135
* - @ref pg_main
136136
* - @ref pg_main_events
137137
* - @ref pg_vrdb_usb
138+
* - Frontends:
139+
* - VirtualBox - The default Qt4 based GUI.
140+
* - VBoxHeadless - The headless frontend.
141+
* - VBoxManage - The CLI.
142+
* - VBoxShell - An interactive shell written in python.
143+
* - VBoxSDL - A very simple GUI.
144+
* - VBoxBFE - A bare metal edition which does not use COM/XPCOM (barely
145+
* maintained atm).
138146
* - IPRT - Runtime Library for hiding host OS differences.
139147
* - Testsuite:
140148
* - @ref pg_testsuite_guideline
141149
*
142150
* @todo Make links to the components.
151+
*
152+
*
153+
*
154+
* @section Execution Contexts
155+
*
156+
* VirtualBox defines a number of different execution context, this can be
157+
* confusing at first. So, to start with take a look at this diagram:
158+
*
159+
* @image html VMMContexts.png
160+
*
161+
* Context definitions:
162+
* - Host context (HC) - This is the context where the host OS runs and
163+
* runs VirtualBox within it. The absense of IN_RC and IN_GUEST
164+
* indicates that we're in HC. IN_RING0 indicates ring-0 (kernel) and
165+
* IN_RING3 indicates ring-3.
166+
* - Raw-mode Context (RC) - This is the special VMM context where we
167+
* execute the guest code directly on the CPU. Kernel code is patched
168+
* and execute in ring-1 instead of ring-0 (ring compression). Ring-3
169+
* code execute unmodified. Only VMMs use ring-1, so we don't need to
170+
* worry about that (it's guarded against in the scheduler (EM)). We can
171+
* in theory run ring-2 there, but since practially only only OS/2 uses
172+
* ring-2, it is of little importance. The macro IN_RC indicates that
173+
* we're compiling something for RC.
174+
* Note! This used to be called GC (see below) earlier, so a bunch of RC
175+
* things are using GC markers.
176+
* - Guest Context (GC) - This is where the guest code is executed. When
177+
* compiling, IN_GUEST indicates that it's for GC. IN_RING0 and
178+
* IN_RING3 are also set when applicable, these are accompanied by
179+
* IN_GUEST_R0 and IN_GUEST_R3 respecitively.
180+
* - Intermediate context - This is a special memory context used within
181+
* the world switchers (HC -> RC and back), it features some identity
182+
* mapped code pages so we can switch to real mode if necessary.
183+
*
143184
*/
144185

0 commit comments

Comments
 (0)