Index: /trunk/include/VBox/Graphics/VBoxVideo.h
===================================================================
--- /trunk/include/VBox/Graphics/VBoxVideo.h	(revision 71601)
+++ /trunk/include/VBox/Graphics/VBoxVideo.h	(revision 71602)
@@ -1391,5 +1391,6 @@
     VBOXVDMA_CTL_TYPE_DISABLE,
     VBOXVDMA_CTL_TYPE_FLUSH,
-    VBOXVDMA_CTL_TYPE_WATCHDOG
+    VBOXVDMA_CTL_TYPE_WATCHDOG,
+    VBOXVDMA_CTL_TYPE_END
 } VBOXVDMA_CTL_TYPE;
 
Index: /trunk/include/iprt/cdefs.h
===================================================================
--- /trunk/include/iprt/cdefs.h	(revision 71601)
+++ /trunk/include/iprt/cdefs.h	(revision 71602)
@@ -1583,5 +1583,5 @@
  * This is more than just documentation as it specifies the 'volatile' keyword,
  * because the guest could modify the data at any time. */
-#define RT_UNTRUSTED_VOLATILE_USER      volatile
+#define RT_UNTRUSTED_VOLATILE_USER              volatile
 
 /** @def RT_UNTRUSTED_GUEST
@@ -1593,5 +1593,5 @@
  * This is more than just documentation as it specifies the 'volatile' keyword,
  * because the guest could modify the data at any time. */
-#define RT_UNTRUSTED_VOLATILE_GUEST     volatile
+#define RT_UNTRUSTED_VOLATILE_GUEST             volatile
 
 /** @def RT_UNTRUSTED_HOST
@@ -1603,5 +1603,5 @@
  * This is more than just documentation as it specifies the 'volatile' keyword,
  * because the host could modify the data at any time. */
-#define RT_UNTRUSTED_VOLATILE_HOST      volatile
+#define RT_UNTRUSTED_VOLATILE_HOST              volatile
 
 /** @def RT_UNTRUSTED_HSTGST
@@ -1613,5 +1613,23 @@
  * This is more than just documentation as it specifies the 'volatile' keyword,
  * because the host could modify the data at any time. */
-#define RT_UNTRUSTED_VOLATILE_HSTGST    volatile
+#define RT_UNTRUSTED_VOLATILE_HSTGST            volatile
+/** @} */
+
+/** @name Fences for use when handling untrusted data.
+ * @{ */
+/** For use after copying untruated volatile data to a non-volatile location.
+ * This translates to a compiler memory barrier and will help ensure that the
+ * compiler uses the non-volatile copy of the data. */
+#define RT_UNTRUSTED_NONVOLATILE_COPY_FENCE()   ASMCompilerBarrier()
+/** For use after finished validating guest input.
+ * What this translates to is architecture dependent.  On intel it will
+ * translate to a CPU load+store fence as well as a compiler memory barrier. */
+#if   defined(RT_ARCH_AMD64)
+# define RT_UNTRUSTED_VALIDATED_FENCE()         do { ASMCompilerBarrier(); ASMMemoryFenceSSE2(); } while (0)
+#elif defined(RT_ARCH_X86)
+# define RT_UNTRUSTED_VALIDATED_FENCE()         do { ASMCompilerBarrier(); ASMMemoryFence(); } while (0)
+#else
+# define RT_UNTRUSTED_VALIDATED_FENCE()         do { ASMCompilerBarrier(); } while (0)
+#endif
 /** @} */
 
