Index: /trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp	(revision 42187)
+++ /trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp	(revision 42188)
@@ -2351,5 +2351,5 @@
 
 
-#ifndef IN_RING0
+#ifdef VBOX_WITH_RAW_MODE_NOT_R0
 /**
  * Updates the EFLAGS while we're in raw-mode.
@@ -2365,5 +2365,5 @@
         PATMRawSetEFlags(pVCpu->CTX_SUFF(pVM), CPUMCTX2CORE(&pVCpu->cpum.s.Guest), fEfl);
 }
-#endif /* !IN_RING0 */
+#endif /* VBOX_WITH_RAW_MODE_NOT_R0 */
 
 
@@ -2567,5 +2567,5 @@
             {
                 uCpl = (pVCpu->cpum.s.Guest.ss.Sel & X86_SEL_RPL);
-#ifndef IN_RING0
+#ifdef VBOX_WITH_RAW_MODE_NOT_R0
                 if (uCpl == 1)
                     uCpl = 0;
Index: /trunk/src/VBox/VMM/VMMAll/HWACCMAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/HWACCMAll.cpp	(revision 42187)
+++ /trunk/src/VBox/VMM/VMMAll/HWACCMAll.cpp	(revision 42188)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2007 Oracle Corporation
+ * Copyright (C) 2006-2012 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -35,4 +35,5 @@
 #include <iprt/x86.h>
 
+
 /**
  * Queues a page for invalidation
Index: /trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/PGMAllBth.h	(revision 42187)
+++ /trunk/src/VBox/VMM/VMMAll/PGMAllBth.h	(revision 42188)
@@ -16,5 +16,5 @@
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2012 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -1979,5 +1979,5 @@
                                 RTGCPTR GCPtrCurPage = (GCPtrPage & ~(RTGCPTR)(GST_PT_MASK << GST_PT_SHIFT)) | ((offPTSrc + iPTDst) << PAGE_SHIFT);
                                 NOREF(GCPtrCurPage);
-#ifndef IN_RING0
+#  ifdef VBOX_WITH_RAW_MODE_NOT_R0
                                 /*
                                  * Assuming kernel code will be marked as supervisor - and not as user level
@@ -1992,5 +1992,5 @@
                                          && PGM_PAGE_HAS_ACTIVE_HANDLERS(pPage))
                                    )
-#endif /* else: CSAM not active */
+#  endif /* else: CSAM not active */
                                    PGM_BTH_NAME(SyncPageWorker)(pVCpu, &pPTDst->a[iPTDst], PdeSrc, *pPteSrc, pShwPage, iPTDst);
                                 Log2(("SyncPage: 4K+ %RGv PteSrc:{P=%d RW=%d U=%d raw=%08llx} PteDst=%08llx%s\n",
@@ -2432,5 +2432,5 @@
         const GSTPTE   PteSrc  = *pPteSrc;
 
-#ifndef IN_RING0
+#ifdef VBOX_WITH_RAW_MODE_NOT_R0
         /* Bail out here as pgmPoolGetPage will return NULL and we'll crash below.
          * Our individual shadow handlers will provide more information and force a fatal exit.
@@ -2823,5 +2823,5 @@
                     if (PteSrc.n.u1Present)
                     {
-# ifndef IN_RING0
+# ifdef VBOX_WITH_RAW_MODE_NOT_R0
                         /*
                          * Assuming kernel code will be marked as supervisor - and not as user level
@@ -2950,5 +2950,5 @@
                         else if (PGM_PAGE_IS_BALLOONED(pPage))
                             SHW_PTE_SET(PteDst, 0); /* Handle ballooned pages at #PF time. */
-# ifndef IN_RING0
+# ifdef VBOX_WITH_RAW_MODE_NOT_R0
                         /*
                          * Assuming kernel code will be marked as supervisor and not as user level and executed
@@ -3417,5 +3417,5 @@
     && PGM_SHW_TYPE != PGM_TYPE_EPT
 
-# ifndef IN_RING0
+# ifdef VBOX_WITH_RAW_MODE_NOT_R0
     if (!(fPage & X86_PTE_US))
     {
Index: /trunk/src/VBox/VMM/VMMAll/PGMAllMap.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/PGMAllMap.cpp	(revision 42187)
+++ /trunk/src/VBox/VMM/VMMAll/PGMAllMap.cpp	(revision 42188)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2007 Oracle Corporation
+ * Copyright (C) 2006-2012 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -260,6 +260,5 @@
 
 
-
-#ifndef IN_RING0
+#ifdef VBOX_WITH_RAW_MODE_NOT_R0
 /**
  * Sets all PDEs involved with the mapping in the shadow page table.
@@ -541,5 +540,5 @@
     PGM_DYNMAP_UNUSED_HINT_VM(pVM, pCurrentShwPdpt);
 }
-#endif /* !IN_RING0 */
+#endif /* VBOX_WITH_RAW_MODE_NOT_R0 */
 
 #if defined(VBOX_STRICT) && !defined(IN_RING0)
@@ -652,5 +651,5 @@
 #endif /* defined(VBOX_STRICT) && !defined(IN_RING0) */
 
-#ifndef IN_RING0
+#ifdef VBOX_WITH_RAW_MODE_NOT_R0
 
 /**
@@ -926,4 +925,4 @@
 }
 
-#endif /* IN_RING0 */
-
+#endif /* VBOX_WITH_RAW_MODE_NOT_R0 */
+
Index: /trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp	(revision 42187)
+++ /trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp	(revision 42188)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2012 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -267,5 +267,5 @@
                     for (unsigned i = 0; i < 2; i++)
                     {
-#  ifndef IN_RING0
+#  ifdef VBOX_WITH_RAW_MODE_NOT_R0
                         if ((uShw.pPDPae->a[iShw + i].u & (PGM_PDFLAGS_MAPPING | X86_PDE_P)) == (PGM_PDFLAGS_MAPPING | X86_PDE_P))
                         {
@@ -275,5 +275,5 @@
                             break;
                         }
-#  endif /* !IN_RING0 */
+#  endif /* VBOX_WITH_RAW_MODE_NOT_R0 */
                         if (uShw.pPDPae->a[iShw+i].n.u1Present)
                         {
@@ -293,5 +293,5 @@
                             if (iShw2 < RT_ELEMENTS(uShw.pPDPae->a))
                             {
-#  ifndef IN_RING0
+#  ifdef VBOX_WITH_RAW_MODE_NOT_R0
                                 if ((uShw.pPDPae->a[iShw2].u & (PGM_PDFLAGS_MAPPING | X86_PDE_P)) == (PGM_PDFLAGS_MAPPING | X86_PDE_P))
                                 {
@@ -301,5 +301,5 @@
                                     break;
                                 }
-#  endif /* !IN_RING0 */
+#  endif /* VBOX_WITH_RAW_MODE_NOT_R0 */
                                 if (uShw.pPDPae->a[iShw2].n.u1Present)
                                 {
@@ -371,5 +371,5 @@
                 LogFlow(("pgmPoolMonitorChainChanging: PGMPOOLKIND_32BIT_PD %x\n", iShw));
                 STAM_COUNTER_INC(&pPool->CTX_MID_Z(StatMonitor,FaultPD));
-#  ifndef IN_RING0
+#  ifdef VBOX_WITH_RAW_MODE_NOT_R0
                 if (uShw.pPD->a[iShw].u & PGM_PDFLAGS_MAPPING)
                 {
@@ -380,8 +380,6 @@
                     break;
                 }
-#  endif /* !IN_RING0 */
-#   ifndef IN_RING0
                 else
-#   endif /* !IN_RING0 */
+#  endif /* VBOX_WITH_RAW_MODE_NOT_R0 */
                 {
                     if (uShw.pPD->a[iShw].n.u1Present)
@@ -403,5 +401,5 @@
                         &&  iShw2 < RT_ELEMENTS(uShw.pPD->a))
                     {
-#   ifndef IN_RING0
+#   ifdef VBOX_WITH_RAW_MODE_NOT_R0
                         if (uShw.pPD->a[iShw2].u & PGM_PDFLAGS_MAPPING)
                         {
@@ -412,5 +410,5 @@
                             break;
                         }
-#   endif /* !IN_RING0 */
+#   endif /* VBOX_WITH_RAW_MODE_NOT_R0 */
                         if (uShw.pPD->a[iShw2].n.u1Present)
                         {
@@ -444,5 +442,5 @@
                 const unsigned iShw = off / sizeof(X86PDEPAE);
                 STAM_COUNTER_INC(&pPool->CTX_MID_Z(StatMonitor,FaultPD));
-#ifndef IN_RING0
+#ifdef VBOX_WITH_RAW_MODE_NOT_R0
                 if (uShw.pPDPae->a[iShw].u & PGM_PDFLAGS_MAPPING)
                 {
@@ -453,5 +451,5 @@
                     break;
                 }
-#endif /* !IN_RING0 */
+#endif /* VBOX_WITH_RAW_MODE_NOT_R0 */
                 /*
                  * Causes trouble when the guest uses a PDE to refer to the whole page table level
@@ -459,7 +457,7 @@
                  * table entries -> recheck; probably only applies to the RC case.)
                  */
-# ifndef IN_RING0
+#ifdef VBOX_WITH_RAW_MODE_NOT_R0
                 else
-# endif /* !IN_RING0 */
+#endif
                 {
                     if (uShw.pPDPae->a[iShw].n.u1Present)
@@ -480,5 +478,5 @@
                     AssertBreak(iShw2 < RT_ELEMENTS(uShw.pPDPae->a));
 
-#ifndef IN_RING0
+#ifdef VBOX_WITH_RAW_MODE_NOT_R0
                     if (    iShw2 != iShw
                         &&  uShw.pPDPae->a[iShw2].u & PGM_PDFLAGS_MAPPING)
@@ -490,8 +488,6 @@
                         break;
                     }
-#endif /* !IN_RING0 */
-# ifndef IN_RING0
                     else
-# endif /* !IN_RING0 */
+#endif /* VBOX_WITH_RAW_MODE_NOT_R0 */
                     if (uShw.pPDPae->a[iShw2].n.u1Present)
                     {
@@ -522,5 +518,5 @@
                 if (iShw < X86_PG_PAE_PDPE_ENTRIES)          /* don't use RT_ELEMENTS(uShw.pPDPT->a), because that's for long mode only */
                 {
-# ifndef IN_RING0
+# ifdef VBOX_WITH_RAW_MODE_NOT_R0
                     if (uShw.pPDPT->a[iShw].u & PGM_PLXFLAGS_MAPPING)
                     {
@@ -531,8 +527,6 @@
                         break;
                     }
-# endif /* !IN_RING0 */
-#  ifndef IN_RING0
                     else
-#  endif /* !IN_RING0 */
+# endif /* VBOX_WITH_RAW_MODE_NOT_R0 */
                     if (uShw.pPDPT->a[iShw].n.u1Present)
                     {
@@ -553,5 +547,5 @@
                             &&  iShw2 < X86_PG_PAE_PDPE_ENTRIES)
                         {
-# ifndef IN_RING0
+# ifdef VBOX_WITH_RAW_MODE_NOT_R0
                             if (uShw.pPDPT->a[iShw2].u & PGM_PLXFLAGS_MAPPING)
                             {
@@ -562,8 +556,6 @@
                                 break;
                             }
-# endif /* !IN_RING0 */
-#  ifndef IN_RING0
                             else
-#  endif /* !IN_RING0 */
+# endif /* VBOX_WITH_RAW_MODE_NOT_R0 */
                             if (uShw.pPDPT->a[iShw2].n.u1Present)
                             {
