Index: /trunk/Makefile.kmk
===================================================================
--- /trunk/Makefile.kmk	(revision 35349)
+++ /trunk/Makefile.kmk	(revision 35350)
@@ -445,5 +445,7 @@
 	include/iprt/linux \
 	include/VBox \
+	include/VBox/vmm \
 	include/VBox/com \
+	include/VBox/ExtPack \
 	include/VBox/HostServices \
 	include/VBox/GuestHost \
@@ -451,10 +453,7 @@
 	src/VBox/VMM \
 	src/VBox/VMM/VMMR0 \
-	src/VBox/VMM/VMMGC \
+	src/VBox/VMM/VMMRC \
+	src/VBox/VMM/VMMR3 \
 	src/VBox/VMM/VMMAll \
-	src/VBox/VMM/PATM \
-	src/VBox/VMM/PATM/VMMR0 \
-	src/VBox/VMM/PATM/VMMGC \
-	src/VBox/VMM/PATM/VMMAll \
 	src/VBox/VMM/VMMSwitcher \
 	src/VBox/Debugger \
@@ -541,28 +540,28 @@
 	$(PATH_ROOT)/doc/VBox-CodingGuidelines.cpp \
 	$(PATH_ROOT)/doc/VBox-MakefileGuidelines.cpp \
-	$(PATH_ROOT)/src/VBox/VMM/VMMR3/VMMCodingGuidelines.cpp \
-	$(PATH_ROOT)/src/VBox/VMM/VMMR3/VMMDocsRawMode.cpp \
+	$(PATH_ROOT)/src/VBox/VMM/Docs-CodingGuidelines.cpp \
+	$(PATH_ROOT)/src/VBox/VMM/Docs-RawMode.cpp \
 	$(PATH_ROOT)/include/VBox/cdefs.h \
-	$(PATH_ROOT)/include/VBox/vmapi.h \
-	$(PATH_ROOT)/include/VBox/vmm.h \
-	$(PATH_ROOT)/include/VBox/cpum.h \
-	$(PATH_ROOT)/include/VBox/mm.h \
-	$(PATH_ROOT)/include/VBox/pgm.h \
-	$(PATH_ROOT)/include/VBox/selm.h \
-	$(PATH_ROOT)/include/VBox/trpm.h \
-	$(PATH_ROOT)/include/VBox/patm.h \
-	$(PATH_ROOT)/include/VBox/dbgf.h \
-	$(PATH_ROOT)/include/VBox/stam.h \
-	$(PATH_ROOT)/include/VBox/em.h \
-	$(PATH_ROOT)/include/VBox/pdm.h \
-	$(PATH_ROOT)/include/VBox/rem.h \
-	$(PATH_ROOT)/include/VBox/iom.h \
-	$(PATH_ROOT)/include/VBox/cfgm.h \
-	$(PATH_ROOT)/include/VBox/tm.h \
-	$(PATH_ROOT)/include/VBox/csam.h \
-	$(PATH_ROOT)/include/VBox/ssm.h \
-	$(PATH_ROOT)/include/VBox/hwaccm.h \
-	$(PATH_ROOT)/include/VBox/hwacc_svm.h \
-	$(PATH_ROOT)/include/VBox/hwacc_vmx.h \
+	$(PATH_ROOT)/include/VBox/vmm/vmapi.h \
+	$(PATH_ROOT)/include/VBox/vmm/vmm.h \
+	$(PATH_ROOT)/include/VBox/vmm/cpum.h \
+	$(PATH_ROOT)/include/VBox/vmm/mm.h \
+	$(PATH_ROOT)/include/VBox/vmm/pgm.h \
+	$(PATH_ROOT)/include/VBox/vmm/selm.h \
+	$(PATH_ROOT)/include/VBox/vmm/trpm.h \
+	$(PATH_ROOT)/include/VBox/vmm/patm.h \
+	$(PATH_ROOT)/include/VBox/vmm/dbgf.h \
+	$(PATH_ROOT)/include/VBox/vmm/stam.h \
+	$(PATH_ROOT)/include/VBox/vmm/em.h \
+	$(PATH_ROOT)/include/VBox/vmm/pdm.h \
+	$(PATH_ROOT)/include/VBox/vmm/rem.h \
+	$(PATH_ROOT)/include/VBox/vmm/iom.h \
+	$(PATH_ROOT)/include/VBox/vmm/cfgm.h \
+	$(PATH_ROOT)/include/VBox/vmm/tm.h \
+	$(PATH_ROOT)/include/VBox/vmm/csam.h \
+	$(PATH_ROOT)/include/VBox/vmm/ssm.h \
+	$(PATH_ROOT)/include/VBox/vmm/hwaccm.h \
+	$(PATH_ROOT)/include/VBox/vmm/hwacc_svm.h \
+	$(PATH_ROOT)/include/VBox/vmm/hwacc_vmx.h \
 	\
 	$(PATH_ROOT)/src/VBox/VMM/include/CFGMInternal.h \
@@ -575,6 +574,6 @@
 	$(PATH_ROOT)/src/VBox/VMM/include/PDMInternal.h \
 	$(PATH_ROOT)/src/VBox/VMM/include/PGMInternal.h \
-	$(PATH_ROOT)/src/VBox/VMM/PATM/CSAMInternal.h \
-	$(PATH_ROOT)/src/VBox/VMM/PATM/PATMInternal.h \
+	$(PATH_ROOT)/src/VBox/VMM/include/CSAMInternal.h \
+	$(PATH_ROOT)/src/VBox/VMM/include/PATMInternal.h \
 	$(PATH_ROOT)/src/VBox/VMM/include/REMInternal.h \
 	$(PATH_ROOT)/src/VBox/VMM/include/SELMInternal.h \
@@ -586,5 +585,5 @@
 	$(PATH_ROOT)/src/VBox/VMM/include/VMMInternal.h \
 	\
-	$(PATH_ROOT)/include/VBox/vm.h \
+	$(PATH_ROOT)/include/VBox/vmm/vm.h \
 	\
 	$(PATH_ROOT)/include/VBox/sup.h \
@@ -593,5 +592,5 @@
 	$(PATH_ROOT)/include/VBox/err.h \
 	$(PATH_ROOT)/include/VBox/x86.h \
-	$(PATH_ROOT)/include/VBox/cpumdis.h \
+	$(PATH_ROOT)/include/VBox/vmm/cpumdis.h \
 	$(PATH_ROOT)/include/VBox/dbggui.h \
 	$(PATH_ROOT)/include/VBox/dis.h \
Index: /trunk/src/VBox/VMM/Docs-CodingGuidelines.cpp
===================================================================
--- /trunk/src/VBox/VMM/Docs-CodingGuidelines.cpp	(revision 35350)
+++ /trunk/src/VBox/VMM/Docs-CodingGuidelines.cpp	(revision 35350)
@@ -0,0 +1,93 @@
+/* $Id$ */
+/** @file
+ * VMM - Coding Guidelines.
+ */
+
+/*
+ * Copyright (C) 2006-2007 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+
+/** @page pg_vmm_guideline                  VMM Coding Guidelines
+ *
+ * The guidelines extends the VBox coding guidelines (@ref pg_vbox_guideline)
+ * and consists of a compulsory part and an optional part. It is very important
+ * that the rules of the compulsory part is followed. That will prevent obvious
+ * bugs, and it will ease porting the code to 32/64 and 64/32 bits setups.
+ *
+ *
+ *
+ * @section sec_vmm_guideline_compulsory        Compulsory
+ *
+ * It is of vital importance is to distinguish between addresses - both virtual
+ * and physical - applying to Guest Context and Host Context. To assist the
+ * coder in this, a set of types and macros have been created. Another vital
+ * thing is that structures shared between the two contexts ends up with the
+ * same size and member offsets in both places. There are types and macros
+ * for that too.
+ *
+ *
+ * The rules:
+ *
+ *      - When declaring pointers in shared structures use the RCPTRTYPE(),
+ *        R0PTRTYPE() and R3PTRTYPE() macros.
+ *
+ *      - Use RTGCPTR and RTHCPTR when dealing with the other context in
+ *        none shared structures, parameter lists, stack variables and such.
+ *
+ *      - Following the above rules, pointers will in a context other than the
+ *        one a pointer was defined for, appear as unsigned integers.
+ *
+ *      - It is NOT permitted to subject a pointer from the other context to pointer
+ *        types of the current context by direct cast or by definition.
+ *
+ *      - When doing pointer arithmetic cast using uintptr_t, intptr_t or char *.
+ *        Never cast a pointer to anything else for this purpose, that will not
+ *        work everywhere! (1)
+ *
+ *      - Physical addresses are also specific to their context. Use RTGCPHYS
+ *        and RTHCPHYS when dealing when them. Both types are unsigned integers.
+ *
+ *      - Integers in shared structures should be using a RT integer type or
+ *        any of the [u]int[0-9]+_t types. (2)
+ *
+ *      - If code is shared between the contexts, GCTYPE() can be used to declare
+ *        things differently. If GCTYPE() usage is extensive, don't share the code.
+ *
+ *      - The context is part of all public symbols which are specific to a single
+ *        context.
+ *
+ *
+ * (1) Talking about porting between 32-bit and 64-bit architectures and even
+ *     between 64-bit platforms. On 64-bit linux int is 32-bit, long is 64-bit.
+ *     However on 64-bit windows both int and long are 32-bit - there is no
+ *     standard 64 bit type (_int64 is not a standard type, it's an stupid
+ *     extension).
+ *
+ * (2) The VBox integer types are RTINT, RTUINT, RTGCINT, RTGCUINT,
+ *     RTGCINTPTR, RTGCUINTPTR, RTHCINT, RTHCUINT, RTHCINTPTR and
+ *     RTHCUINTPTR.
+ *
+ *
+ *
+ * @section sec_vmm_guideline_optional          Optional
+ *
+ * There are the general VBox guidelines, see @ref sec_vbox_guideline_optional.
+ * In addition to these for the following rules applies to the VMM:
+ *
+ *      - Prefixes GCPtr and HCPtr are preferred over suffixes HC and GC of
+ *        pointers.
+ *
+ *      - Prefixes GCPhys and HCPhys are generally used for physical addresses,
+ *        types RTGCPHYS and RTHCPHYS respectively.
+ *
+ */
+
Index: /trunk/src/VBox/VMM/Docs-RawMode.cpp
===================================================================
--- /trunk/src/VBox/VMM/Docs-RawMode.cpp	(revision 35350)
+++ /trunk/src/VBox/VMM/Docs-RawMode.cpp	(revision 35350)
@@ -0,0 +1,34 @@
+/* $Id$ */
+/** @file
+ * This file contains the documentation of the raw-mode execution.
+ */
+
+/*
+ * Copyright (C) 2006-2007 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+
+
+/** @page pg_raw                Raw-mode Code Execution
+ *
+ * This chapter describes the virtualization technique which we call raw-mode
+ * and how VirtualBox makes use of it and implements it.
+ *
+ * @todo Write raw-mode chapter!
+ *
+ *
+ * @section sec_rawr3           Raw-Ring3
+ *
+ *
+ * @section sec_rawr0           Raw-Ring0
+ *
+ *
+ */
Index: unk/src/VBox/VMM/VMMR3/VMMCodingGuidelines.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/VMMCodingGuidelines.cpp	(revision 35349)
+++ 	(revision )
@@ -1,93 +1,0 @@
-/* $Id$ */
-/** @file
- * VMM - Coding Guidelines.
- */
-
-/*
- * Copyright (C) 2006-2007 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-/** @page pg_vmm_guideline                  VMM Coding Guidelines
- *
- * The guidelines extends the VBox coding guidelines (@ref pg_vbox_guideline)
- * and consists of a compulsory part and an optional part. It is very important
- * that the rules of the compulsory part is followed. That will prevent obvious
- * bugs, and it will ease porting the code to 32/64 and 64/32 bits setups.
- *
- *
- *
- * @section sec_vmm_guideline_compulsory        Compulsory
- *
- * It is of vital importance is to distinguish between addresses - both virtual
- * and physical - applying to Guest Context and Host Context. To assist the
- * coder in this, a set of types and macros have been created. Another vital
- * thing is that structures shared between the two contexts ends up with the
- * same size and member offsets in both places. There are types and macros
- * for that too.
- *
- *
- * The rules:
- *
- *      - When declaring pointers in shared structures use the RCPTRTYPE(),
- *        R0PTRTYPE() and R3PTRTYPE() macros.
- *
- *      - Use RTGCPTR and RTHCPTR when dealing with the other context in
- *        none shared structures, parameter lists, stack variables and such.
- *
- *      - Following the above rules, pointers will in a context other than the
- *        one a pointer was defined for, appear as unsigned integers.
- *
- *      - It is NOT permitted to subject a pointer from the other context to pointer
- *        types of the current context by direct cast or by definition.
- *
- *      - When doing pointer arithmetic cast using uintptr_t, intptr_t or char *.
- *        Never cast a pointer to anything else for this purpose, that will not
- *        work everywhere! (1)
- *
- *      - Physical addresses are also specific to their context. Use RTGCPHYS
- *        and RTHCPHYS when dealing when them. Both types are unsigned integers.
- *
- *      - Integers in shared structures should be using a RT integer type or
- *        any of the [u]int[0-9]+_t types. (2)
- *
- *      - If code is shared between the contexts, GCTYPE() can be used to declare
- *        things differently. If GCTYPE() usage is extensive, don't share the code.
- *
- *      - The context is part of all public symbols which are specific to a single
- *        context.
- *
- *
- * (1) Talking about porting between 32-bit and 64-bit architectures and even
- *     between 64-bit platforms. On 64-bit linux int is 32-bit, long is 64-bit.
- *     However on 64-bit windows both int and long are 32-bit - there is no
- *     standard 64 bit type (_int64 is not a standard type, it's an stupid
- *     extension).
- *
- * (2) The VBox integer types are RTINT, RTUINT, RTGCINT, RTGCUINT,
- *     RTGCINTPTR, RTGCUINTPTR, RTHCINT, RTHCUINT, RTHCINTPTR and
- *     RTHCUINTPTR.
- *
- *
- *
- * @section sec_vmm_guideline_optional          Optional
- *
- * There are the general VBox guidelines, see @ref sec_vbox_guideline_optional.
- * In addition to these for the following rules applies to the VMM:
- *
- *      - Prefixes GCPtr and HCPtr are preferred over suffixes HC and GC of
- *        pointers.
- *
- *      - Prefixes GCPhys and HCPhys are generally used for physical addresses,
- *        types RTGCPHYS and RTHCPHYS respectively.
- *
- */
-
Index: unk/src/VBox/VMM/VMMR3/VMMDocsRawMode.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/VMMDocsRawMode.cpp	(revision 35349)
+++ 	(revision )
@@ -1,34 +1,0 @@
-/* $Id$ */
-/** @file
- * This file contains the documentation of the raw-mode execution.
- */
-
-/*
- * Copyright (C) 2006-2007 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-
-
-/** @page pg_raw                Raw-mode Code Execution
- *
- * This chapter describes the virtualization technique which we call raw-mode
- * and how VirtualBox makes use of it and implements it.
- *
- * @todo Write raw-mode chapter!
- *
- *
- * @section sec_rawr3           Raw-Ring3
- *
- *
- * @section sec_rawr0           Raw-Ring0
- *
- *
- */
