Index: /trunk/include/VBox/cdefs.h
===================================================================
--- /trunk/include/VBox/cdefs.h	(revision 22801)
+++ /trunk/include/VBox/cdefs.h	(revision 22802)
@@ -253,7 +253,9 @@
  */
 #ifdef IN_VMM_R3
-# define VMMR3DECL(type)    DECLEXPORT(type) VBOXCALL
-#else
-# define VMMR3DECL(type)    DECLIMPORT(type) VBOXCALL
+# define VMMR3DECL(type)            DECLEXPORT(type) VBOXCALL
+#elif defined(IN_RING3)
+# define VMMR3DECL(type)            DECLIMPORT(type) VBOXCALL
+#else
+# define VMMR3DECL(type)            DECL_INVALID(type)
 #endif
 
@@ -267,7 +269,9 @@
  */
 #ifdef IN_VMM_R0
-# define VMMR0DECL(type)    DECLEXPORT(type) VBOXCALL
-#else
-# define VMMR0DECL(type)    DECLIMPORT(type) VBOXCALL
+# define VMMR0DECL(type)            DECLEXPORT(type) VBOXCALL
+#elif defined(IN_RING0)
+# define VMMR0DECL(type)            DECLIMPORT(type) VBOXCALL
+#else
+# define VMMR0DECL(type)            DECL_INVALID(type)
 #endif
 
@@ -281,7 +285,9 @@
  */
 #ifdef IN_VMM_RC
-# define VMMRCDECL(type)    DECLEXPORT(type) VBOXCALL
-#else
-# define VMMRCDECL(type)    DECLIMPORT(type) VBOXCALL
+# define VMMRCDECL(type)            DECLEXPORT(type) VBOXCALL
+#elif defined(IN_RC)
+# define VMMRCDECL(type)            DECLIMPORT(type) VBOXCALL
+#else
+# define VMMRCDECL(type)            DECL_INVALID(type)
 #endif
 
@@ -291,7 +297,9 @@
  */
 #if defined(IN_VMM_R0) || defined(IN_VMM_RC)
-# define VMMRZDECL(type)    DECLEXPORT(type) VBOXCALL
-#else
-# define VMMRZDECL(type)    DECLIMPORT(type) VBOXCALL
+# define VMMRZDECL(type)            DECLEXPORT(type) VBOXCALL
+#elif defined(IN_RING0) || defined(IN_RZ)
+# define VMMRZDECL(type)            DECLIMPORT(type) VBOXCALL
+#else
+# define VMMRZDECL(type)            DECL_INVALID(type)
 #endif
 
@@ -301,7 +309,57 @@
  */
 #if defined(IN_VMM_R3) || defined(IN_VMM_R0) || defined(IN_VMM_RC)
-# define VMMDECL(type)      DECLEXPORT(type) VBOXCALL
-#else
-# define VMMDECL(type)      DECLIMPORT(type) VBOXCALL
+# define VMMDECL(type)              DECLEXPORT(type) VBOXCALL
+#else
+# define VMMDECL(type)              DECLIMPORT(type) VBOXCALL
+#endif
+
+/** @def VMM_INT_DECL
+ * VMM internal function.
+ * @param   type    The return type of the function declaration.
+ */
+#if defined(IN_VMM_R3) || defined(IN_VMM_R0) || defined(IN_VMM_RC)
+# define VMM_INT_DECL(type)         DECLHIDDEN(type) VBOXCALL
+#else
+# define VMM_INT_DECL(type)         DECL_INVALID(type)
+#endif
+
+/** @def VMMR3_INT_DECL
+ * VMM internal function, ring-3.
+ * @param   type    The return type of the function declaration.
+ */
+#ifdef IN_VMM_R3
+# define VMMR3_INT_DECL(type)       DECLHIDDEN(type) VBOXCALL
+#else
+# define VMMR3_INT_DECL(type)       DECL_INVALID(type)
+#endif
+
+/** @def VMMR0_INT_DECL
+ * VMM internal function, ring-0.
+ * @param   type    The return type of the function declaration.
+ */
+#ifdef IN_VMM_R0
+# define VMMR0_INT_DECL(type)       DECLHIDDEN(type) VBOXCALL
+#else
+# define VMMR0_INT_DECL(type)       DECL_INVALID(type)
+#endif
+
+/** @def VMMRC_INT_DECL
+ * VMM internal function, raw-mode context.
+ * @param   type    The return type of the function declaration.
+ */
+#ifdef IN_VMM_RC
+# define VMMRC_INT_DECL(type)       DECLHIDDEN(type) VBOXCALL
+#else
+# define VMMRC_INT_DECL(type)       DECL_INVALID(type)
+#endif
+
+/** @def VMMRZ_INT_DECL
+ * VMM internal function, ring-0 + raw-mode context.
+ * @param   type    The return type of the function declaration.
+ */
+#ifdef IN_VMM_RZ
+# define VMMRZ_INT_DECL(type)       DECLHIDDEN(type) VBOXCALL
+#else
+# define VMMRZ_INT_DECL(type)       DECL_INVALID(type)
 #endif
 
