Index: /trunk/Config.kmk
===================================================================
--- /trunk/Config.kmk	(revision 4828)
+++ /trunk/Config.kmk	(revision 4829)
@@ -168,8 +168,11 @@
 # build enhanced version of rdesktop
 VBOX_WITH_VRDP_RDESKTOP = 1
-ifeq ($(filter-out darwin.x86 darwin.amd64 os2.x86 win.amd64,$(BUILD_TARGET).$(BUILD_TARGET_ARCH)),)
+ifeq ($(filter-out darwin.x86 darwin.amd64 win.amd64,$(BUILD_TARGET).$(BUILD_TARGET_ARCH)),)
 # build the support driver & library without IDT patching.
 ## @todo invert this!
 VBOX_WITHOUT_IDT_PATCHING = 1
+else
+# build the support driver & library with IDT patching.
+VBOX_WITH_IDT_PATCHING = 1
 endif
 # The kernel driver/module and related runtime libraries.
@@ -666,7 +669,4 @@
 ifdef VBOX_STRICT
  DEFS += VBOX_STRICT
-endif
-ifdef VBOX_WITHOUT_IDT_PATCHING
- DEFS += VBOX_WITHOUT_IDT_PATCHING
 endif
 ifdef LOG_ENABLED
Index: /trunk/include/VBox/trpm.h
===================================================================
--- /trunk/include/VBox/trpm.h	(revision 4828)
+++ /trunk/include/VBox/trpm.h	(revision 4829)
@@ -463,6 +463,4 @@
 TRPMR0DECL(void) TRPMR0DispatchHostInterrupt(PVM pVM);
 
-# ifndef VBOX_WITHOUT_IDT_PATCHING
-
 /**
  * Changes the VMMR0Entry() call frame and stack used by the IDT patch code
@@ -475,6 +473,4 @@
 TRPMR0DECL(void) TRPMR0SetupInterruptDispatcherFrame(PVM pVM, void *pvRet);
 
-# endif /* !VBOX_WITHOUT_IDT_PATCHING */
-
 /** @} */
 #endif
Index: /trunk/src/VBox/HostDrivers/Support/Makefile.kmk
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/Makefile.kmk	(revision 4828)
+++ /trunk/src/VBox/HostDrivers/Support/Makefile.kmk	(revision 4829)
@@ -65,4 +65,7 @@
 endif
 SUPR3_DEFS          = IN_SUP_R3 IN_RT_R3
+ifdef VBOX_WITH_IDT_PATCHING
+SUPR3_DEFS         += VBOX_WITH_IDT_PATCHING
+endif
 SUPR3_INCS         := $(PATH_SUB_CURRENT)
 SUPR3_INCS.l4       = $(L4_INCDIR)
@@ -95,4 +98,7 @@
 endif
 VBoxDrv_DEFS          = IN_RT_R0 IN_SUP_R0 USE_NEW_OS_INTERFACE_FOR_MM
+ifdef VBOX_WITH_IDT_PATCHING
+VBoxDrv_DEFS         += VBOX_WITH_IDT_PATCHING
+endif
 VBoxDrv_SDKS          = W2K3DDK WINPSDKINCS
 VBoxDrv_INCS         := $(PATH_SUB_CURRENT)
@@ -144,4 +150,7 @@
 vboxdrv_TEMPLATE      = VBOXR0DRV
 vboxdrv_DEFS          = KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) MODULE IN_RT_R0 IN_SUP_R0 CONFIG_VBOXDRV_AS_MISC USE_NEW_OS_INTERFACE_FOR_MM
+ifdef VBOX_WITH_IDT_PATCHING
+vboxdrv_DEFS         += VBOX_WITH_IDT_PATCHING
+endif
 vboxdrv_INCS         := $(PATH_SUB_CURRENT)
 vboxdrv_LIBS          = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
@@ -163,4 +172,7 @@
 VBoxDrv_TEMPLATE      = VBOXR0DRV
 VBoxDrv_DEFS          = IN_RT_R0 IN_SUP_R0 USE_NEW_OS_INTERFACE
+ifdef VBOX_WITH_IDT_PATCHING
+VBoxDrv_DEFS         += VBOX_WITH_IDT_PATCHING
+endif
 VBoxDrv_DEFS         += DEBUG_DARWIN_GIP
 VBoxDrv_INCS         := $(PATH_SUB_CURRENT)
@@ -201,4 +213,7 @@
 VBoxDrv_TEMPLATE      = VBOXR0DRV
 VBoxDrv_DEFS          = IN_RT_R0 IN_SUP_R0 USE_NEW_OS_INTERFACE
+ifdef VBOX_WITH_IDT_PATCHING
+VBoxDrv_DEFS         += VBOX_WITH_IDT_PATCHING
+endif
 VBoxDrv_INCS         := $(PATH_SUB_CURRENT)
 #VBoxDrv_LDFLAGS       = -s -t -v
@@ -217,4 +232,7 @@
 VBoxDrvLib_NOINST     = 1
 VBoxDrvLib_DEFS       = IN_RT_R0 IN_SUP_R0 USE_NEW_OS_INTERFACE
+ifdef VBOX_WITH_IDT_PATCHING
+VBoxDrv_DEFS         += VBOX_WITH_IDT_PATCHING
+endif
 VBoxDrvLib_INCS      := \
 	$(PATH_SUB_CURRENT) \
@@ -233,4 +251,7 @@
 vboxdrv_TEMPLATE      = VBOXR0DRV
 vboxdrv_DEFS          = IN_RT_R0 IN_SUP_R0 USE_NEW_OS_INTERFACE
+ifdef VBOX_WITH_IDT_PATCHING
+vboxdrv_DEFS         += VBOX_WITH_IDT_PATCHING
+endif
 vboxdrv_INCS         := $(PATH_SUB_CURRENT)
 vboxdrv_LIBS          = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
@@ -247,4 +268,7 @@
 vboxdrv_TEMPLATE      = VBOXR0DRV
 vboxdrv_DEFS          = IN_RT_R0 IN_SUP_R0 USE_NEW_OS_INTERFACE
+ifdef VBOX_WITH_IDT_PATCHING
+vboxdrv_DEFS         += VBOX_WITH_IDT_PATCHING
+endif
 vboxdrv_INCS         := $(PATH_SUB_CURRENT)
 vboxdrv_LIBS          = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
Index: /trunk/src/VBox/HostDrivers/Support/SUPDRV.h
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDRV.h	(revision 4828)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDRV.h	(revision 4829)
@@ -251,5 +251,5 @@
 typedef struct SUPDRVDEVEXT *PSUPDRVDEVEXT;
 
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
 
 /**
@@ -339,5 +339,5 @@
 } SUPDRVPATCHUSAGE, *PSUPDRVPATCHUSAGE;
 
-#endif /* !VBOX_WITHOUT_IDT_PATCHING */
+#endif /* VBOX_WITH_IDT_PATCHING */
 
 
@@ -562,5 +562,5 @@
     /** Load usage records. (protected by SUPDRVDEVEXT::mtxLdr) */
     PSUPDRVLDRUSAGE volatile    pLdrUsage;
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
     /** Patch usage records. (protected by SUPDRVDEVEXT::SpinLock) */
     PSUPDRVPATCHUSAGE volatile  pPatchUsage;
@@ -615,5 +615,5 @@
     RTSPINLOCK              Spinlock;
 
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
     /** List of patches. */
     PSUPDRVPATCH volatile   pIdtPatches;
Index: /trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c	(revision 4828)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c	(revision 4829)
@@ -154,5 +154,5 @@
 static int      supdrvMemAdd(PSUPDRVMEMREF pMem, PSUPDRVSESSION pSession);
 static int      supdrvMemRelease(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr, SUPDRVMEMREFTYPE eType);
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
 static int      supdrvIOCtl_IdtInstall(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPIDTINSTALL pReq);
 static PSUPDRVPATCH supdrvIdtPatchOne(PSUPDRVDEVEXT pDevExt, PSUPDRVPATCH pPatch);
@@ -160,5 +160,5 @@
 static void     supdrvIdtRemoveOne(PSUPDRVDEVEXT pDevExt, PSUPDRVPATCH pPatch);
 static void     supdrvIdtWrite(volatile void *pvIdtEntry, const SUPDRVIDTE *pNewIDTEntry);
-#endif /* !VBOX_WITHOUT_IDT_PATCHING */
+#endif /* VBOX_WITH_IDT_PATCHING */
 static int      supdrvIOCtl_LdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPLDROPEN pReq);
 static int      supdrvIOCtl_LdrLoad(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPLDRLOAD pReq);
@@ -233,5 +233,5 @@
 void VBOXCALL supdrvDeleteDevExt(PSUPDRVDEVEXT pDevExt)
 {
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
     PSUPDRVPATCH        pPatch;
 #endif
@@ -252,5 +252,5 @@
      * Free lists.
      */
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
     /* patches */
     /** @todo make sure we don't uninstall patches which has been patched by someone else. */
@@ -263,5 +263,5 @@
         RTMemExecFree(pvFree);
     }
-#endif /* !VBOX_WITHOUT_IDT_PATCHING */
+#endif /* VBOX_WITH_IDT_PATCHING */
 
     /* objects. */
@@ -384,5 +384,5 @@
     RTLogSetDefaultInstanceThread(NULL, (uintptr_t)pSession);
 
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
     /*
      * Uninstall any IDT patches installed for this session.
@@ -796,5 +796,5 @@
 
             /* execute */
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
             pReq->Hdr.rc = supdrvIOCtl_IdtInstall(pDevExt, pSession, pReq);
 #else
@@ -812,5 +812,5 @@
 
             /* execute */
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
             pReq->Hdr.rc = supdrvIOCtl_IdtRemoveAll(pDevExt, pSession);
 #else
@@ -2425,5 +2425,5 @@
 
 
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
 /**
  * Install IDT for the current CPU.
@@ -3084,5 +3084,5 @@
     ASMSetFlags(uFlags);
 }
-#endif /* !VBOX_WITHOUT_IDT_PATCHING */
+#endif /* VBOX_WITH_IDT_PATCHING */
 
 
@@ -3460,5 +3460,5 @@
     if (!pDevExt->pvVMMR0)
     {
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
         PSUPDRVPATCH pPatch;
 #endif
@@ -3471,5 +3471,5 @@
         pDevExt->pfnVMMR0EntryFast  = pvVMMR0EntryFast;
         pDevExt->pfnVMMR0EntryEx    = pvVMMR0EntryEx;
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
         for (pPatch = pDevExt->pIdtPatches; pPatch; pPatch = pPatch->pNext)
         {
@@ -3481,5 +3481,5 @@
 # endif
         }
-#endif /* !VBOX_WITHOUT_IDT_PATCHING */
+#endif /* VBOX_WITH_IDT_PATCHING */
     }
     else
@@ -3508,5 +3508,5 @@
 static void supdrvLdrUnsetR0EP(PSUPDRVDEVEXT pDevExt)
 {
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
     PSUPDRVPATCH pPatch;
 #endif
@@ -3517,5 +3517,5 @@
     pDevExt->pfnVMMR0EntryEx    = NULL;
 
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
     for (pPatch = pDevExt->pIdtPatches; pPatch; pPatch = pPatch->pNext)
     {
@@ -3528,5 +3528,5 @@
 # endif
     }
-#endif /* !VBOX_WITHOUT_IDT_PATCHING */
+#endif /* VBOX_WITH_IDT_PATCHING */
 }
 
Index: /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp	(revision 4828)
+++ /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp	(revision 4829)
@@ -102,5 +102,5 @@
 static PSUPQUERYFUNCS g_pFunctions;
 
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
 /** The negotiated interrupt number. */
 static uint8_t      g_u8Interrupt = 3;
@@ -123,5 +123,5 @@
 static int supInitFake(PSUPDRVSESSION *ppSession);
 static int supLoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase);
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
 static int supInstallIDTE(void);
 #endif
@@ -360,5 +360,5 @@
         if (ppSession)
             *ppSession = g_pSession;
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
         Assert(g_u8Interrupt == 3);
 #endif
@@ -412,5 +412,5 @@
         g_u32Cookie         = 0;
         g_u32SessionCookie  = 0;
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
         g_u8Interrupt       = 3;
 #endif
@@ -552,5 +552,5 @@
 SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, unsigned uOperation, void *pvArg)
 {
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#if defined(VBOX_WITH_IDT_PATCHING) && !defined(RT_OS_OS2)
     return g_pfnCallVMMR0(pVMR0, uOperation, pvArg);
 
@@ -1065,5 +1065,5 @@
      */
     int rc = supLoadModule(pszFilename, pszModule, ppvImageBase);
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
     if (    RT_SUCCESS(rc)
         &&  !strcmp(pszModule, "VMMR0.r0"))
@@ -1073,5 +1073,5 @@
             SUPFreeModule(*ppvImageBase);
     }
-#endif /* VBOX_WITHOUT_IDT_PATCHING */
+#endif /* VBOX_WITH_IDT_PATCHING */
 
     return rc;
@@ -1079,5 +1079,5 @@
 
 
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
 /**
  * Generates the code for calling the interrupt gate.
@@ -1274,5 +1274,5 @@
     return rc;
 }
-#endif /* !VBOX_WITHOUT_IDT_PATCHING */
+#endif /* VBOX_WITH_IDT_PATCHING */
 
 
@@ -1636,5 +1636,5 @@
     if (RT_UNLIKELY(g_u32FakeMode))
     {
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
         g_u8Interrupt = 3;
         RTMemExecFree(*(void **)&g_pfnCallVMMR0);
@@ -1645,5 +1645,5 @@
     }
 
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
     /*
      * There is one special module. When this is freed we'll
@@ -1671,5 +1671,5 @@
         g_pfnCallVMMR0 = NULL;
     }
-#endif /* VBOX_WITHOUT_IDT_PATCHING */
+#endif /* VBOX_WITH_IDT_PATCHING */
 
     /*
Index: /trunk/src/VBox/HostDrivers/Support/linux/Makefile
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/linux/Makefile	(revision 4828)
+++ /trunk/src/VBox/HostDrivers/Support/linux/Makefile	(revision 4829)
@@ -117,5 +117,5 @@
  export INCL
 endif
-KFLAGS   := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0
+KFLAGS   := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX_WITH_IDT_PATCHING
 ifndef CONFIG_VBOXDRV_FIXEDMAJOR
  KFLAGS  += -DCONFIG_VBOXDRV_AS_MISC
Index: /trunk/src/VBox/HostDrivers/Support/testcase/Makefile.kmk
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/testcase/Makefile.kmk	(revision 4828)
+++ /trunk/src/VBox/HostDrivers/Support/testcase/Makefile.kmk	(revision 4829)
@@ -6,5 +6,5 @@
 #
 #  Copyright (C) 2006-2007 innotek GmbH
-# 
+#
 #  This file is part of VirtualBox Open Source Edition (OSE), as
 #  available from http://www.virtualbox.org. This file is free software;
@@ -45,4 +45,7 @@
 tstInt_SOURCES        = tstInt.cpp
 tstInt_LIBS           = $(LIB_RUNTIME)
+ifdef VBOX_WITH_IDT_PATCHING
+tstInt_DEFS          += VBOX_WITH_IDT_PATCHING
+endif
 
 tstContiguous_TEMPLATE= VBOXR3TSTEXE
Index: /trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp	(revision 4828)
+++ /trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp	(revision 4829)
@@ -148,5 +148,5 @@
                                  i, NanoSecs, Ticks, NanoSecs / i, Ticks / i, MinTicks);
 
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
                         /*
                          * The fast path.
@@ -176,5 +176,5 @@
                         RTPrintf("tstInt: SUPCallVMMR0Fast - %d iterations in %llu ns / %llu ticks. %llu ns / %#llu ticks per iteration. Min %llu ticks.\n",
                                  i, NanoSecs, Ticks, NanoSecs / i, Ticks / i, MinTicks);
-#endif /* !VBOX_WITHOUT_IDT_PATCHING */
+#endif /* VBOX_WITH_IDT_PATCHING */
 
                         /*
Index: /trunk/src/VBox/VMM/Makefile.kmk
===================================================================
--- /trunk/src/VBox/VMM/Makefile.kmk	(revision 4828)
+++ /trunk/src/VBox/VMM/Makefile.kmk	(revision 4829)
@@ -37,4 +37,7 @@
 VMMR3_DEFS      = IN_VMM_R3  IN_PDM_R3  IN_CFGM_R3 IN_IOM_R3  IN_VM_R3   IN_CPUM_R3 IN_SELM_R3 IN_PGM_R3 IN_TRPM_R3 IN_MM_R3 IN_DBG_R3 \
                   IN_DBGF_R3 IN_PATM_R3 IN_DIS_R3  IN_STAM_R3 IN_CSAM_R3 IN_EM_R3   IN_TM_R3   IN_SSM_R3 IN_HWACCM_R3
+ifdef VBOX_WITH_IDT_PATCHING
+VMMR3_DEFS     += VBOX_WITH_IDT_PATCHING
+endif
 VMMR3_INCS     := \
 	PATM \
@@ -226,4 +229,7 @@
      PATM
 VMMGC_DEFS      = IN_VMM_GC IN_PDM_GC IN_CFGM_GC IN_IOM_GC IN_MM_GC IN_RT_GC IN_TRPM_GC IN_SELM_GC IN_VM_GC IN_IOM_GC IN_DIS_GC DIS_CORE_ONLY IN_PGM_GC IN_CPUM_GC IN_EM_GC IN_TM_GC IN_PATM_GC IN_CSAM_GC IN_REM_GC IN_DBGF_GC
+ifdef VBOX_WITH_IDT_PATCHING
+VMMGC_DEFS     += VBOX_WITH_IDT_PATCHING
+endif
 VMMGC_SYSSUFF   = .gc
 VMMGC_LIBS      = \
@@ -308,4 +314,7 @@
 	PATM
 VMMR0_DEFS      = IN_VMM_R0 IN_RT_R0 IN_TRPM_R0 IN_CPUM_R0 IN_VM_R0 IN_TM_R0 IN_INTNET_R0 IN_HWACCM_R0 IN_EM_R0 IN_PDM_R0 IN_PGM_R0 IN_DIS_R0 IN_MM_R0 IN_SELM_R0 IN_CSAM_R0 IN_PATM_R0 IN_DBGF_R0 IN_REM_R0 IN_IOM_R0 DIS_CORE_ONLY
+ifdef VBOX_WITH_IDT_PATCHING
+VMMR0_DEFS     += VBOX_WITH_IDT_PATCHING
+endif
 ifeq ($(VBOX_LDR_FMT),pe)
 VMMR0_LDFLAGS   = -Entry:VMMR0EntryEx
Index: /trunk/src/VBox/VMM/TRPMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/TRPMInternal.h	(revision 4828)
+++ /trunk/src/VBox/VMM/TRPMInternal.h	(revision 4829)
@@ -219,5 +219,5 @@
 DECLASM(void) trpmR0DispatchHostInterruptSimple(RTUINT uActiveVector);
 
-# ifndef VBOX_WITHOUT_IDT_PATCHING
+# ifdef VBOX_WITH_IDT_PATCHING
 /**
  * Code used for the dispatching of interrupts in HC.
@@ -225,5 +225,5 @@
  */
 DECLASM(int) trpmR0InterruptDispatcher(void);
-# endif /* !VBOX_WITHOUT_IDT_PATCHING */
+# endif /* VBOX_WITH_IDT_PATCHING */
 
 #endif
Index: /trunk/src/VBox/VMM/VMMR0/TRPMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/TRPMR0.cpp	(revision 4828)
+++ /trunk/src/VBox/VMM/VMMR0/TRPMR0.cpp	(revision 4829)
@@ -98,7 +98,7 @@
 
 
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
 # ifdef VBOX_WITH_HYBIRD_32BIT_KERNEL
-#  error "VBOX_WITH_HYBIRD_32BIT_KERNEL without VBOX_WITHOUT_IDT_PATCHING isn't supported"
+#  error "VBOX_WITH_HYBIRD_32BIT_KERNEL with VBOX_WITH_IDT_PATCHING isn't supported"
 # endif
 
@@ -205,3 +205,3 @@
 }
 
-#endif /* !VBOX_WITHOUT_IDT_PATCHING */
+#endif /* VBOX_WITH_IDT_PATCHING */
Index: /trunk/src/VBox/VMM/VMMR0/TRPMR0A.asm
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/TRPMR0A.asm	(revision 4828)
+++ /trunk/src/VBox/VMM/VMMR0/TRPMR0A.asm	(revision 4829)
@@ -6,5 +6,5 @@
 ;
 ;  Copyright (C) 2006-2007 innotek GmbH
-; 
+;
 ;  This file is part of VirtualBox Open Source Edition (OSE), as
 ;  available from http://www.virtualbox.org. This file is free software;
@@ -114,5 +114,5 @@
 
 
-%ifndef VBOX_WITHOUT_IDT_PATCHING
+%ifdef VBOX_WITH_IDT_PATCHING
 
     align 16
@@ -155,5 +155,5 @@
 ENDPROC   trpmR0InterruptDispatcher
 
-%endif ; !VBOX_WITHOUT_IDT_PATCHING
+%endif ; VBOX_WITH_IDT_PATCHING
 
 
Index: /trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/VMMR0.cpp	(revision 4828)
+++ /trunk/src/VBox/VMM/VMMR0/VMMR0.cpp	(revision 4829)
@@ -426,5 +426,5 @@
     switch (enmOperation)
     {
-#ifndef VBOX_WITHOUT_IDT_PATCHING
+#ifdef VBOX_WITH_IDT_PATCHING
         /*
          * Switch to GC.
@@ -570,5 +570,5 @@
         case VMMR0_DO_NOP:
             return VINF_SUCCESS;
-#endif /* !VBOX_WITHOUT_IDT_PATCHING */
+#endif /* VBOX_WITH_IDT_PATCHING */
 
         default:
Index: /trunk/src/VBox/VMM/testcase/Makefile.kmk
===================================================================
--- /trunk/src/VBox/VMM/testcase/Makefile.kmk	(revision 4828)
+++ /trunk/src/VBox/VMM/testcase/Makefile.kmk	(revision 4829)
@@ -6,5 +6,5 @@
 #
 #  Copyright (C) 2006-2007 innotek GmbH
-# 
+#
 #  This file is part of VirtualBox Open Source Edition (OSE), as
 #  available from http://www.virtualbox.org. This file is free software;
@@ -65,4 +65,7 @@
 tstVMStructGC_TEMPLATE  = VBOXGCEXE
 tstVMStructGC_DEFS      = IN_VMM_GC IN_PDM_GC IN_CFGM_GC IN_IOM_GC IN_VM_GC IN_CPUM_GC IN_SELM_GC IN_PGM_GC IN_TRPM_GC IN_MM_GC IN_PDM_GC IN_DBGF_GC IN_PATM_GC IN_DIS_GC IN_STAM_GC IN_VGADEVICE_GC IN_CSAM_GC IN_SSM_GC IN_REM_GC IN_RRM_GC
+ifdef VBOX_WITH_IDT_PATCHING
+tstVMStructGC_DEFS     += VBOX_WITH_IDT_PATCHING
+endif
 tstVMStructGC_SOURCES   = tstVMStructGC.cpp
 tstVMStructGC_INCS      = $(VBOX_PATH_VMM_SRC) $(VBOX_PATH_VMM_SRC)/PATM
@@ -70,4 +73,7 @@
 tstVMStructSize_TEMPLATE= VBOXR3TSTEXE
 tstVMStructSize_DEFS    = IN_VMM_R3 IN_PDM_R3 IN_CFGM_R3 IN_IOM_R3 IN_VM_R3 IN_CPUM_R3 IN_SELM_R3 IN_PGM_R3 IN_TRPM_R3 IN_MM_R3 IN_PDM_R3 IN_DBGF_R3 IN_PATM_R3 IN_DIS_R3 IN_STAM_R3 IN_VGADEVICE_R3 IN_CSAM_R3 IN_SSM_R3 IN_REM_R3
+ifdef VBOX_WITH_IDT_PATCHING
+tstVMStructSize_DEFS   += VBOX_WITH_IDT_PATCHING
+endif
 tstVMStructSize_INCS    = $(VBOX_PATH_VMM_SRC) $(VBOX_PATH_VMM_SRC)/PATM $(PATH_TARGET)
 tstVMStructSize_SOURCES = tstVMStructSize.cpp
@@ -77,4 +83,7 @@
 tstAsmStructs_TEMPLATE  = VBOXR3TSTEXE
 tstAsmStructs_DEFS      = IN_VMM_R3 IN_PDM_R3 IN_CFGM_R3 IN_IOM_R3 IN_VM_R3 IN_CPUM_R3 IN_SELM_R3 IN_PGM_R3 IN_TRPM_R3 IN_MM_R3 IN_PDM_R3 IN_DBGF_R3 IN_PATM_R3 IN_DIS_R3 IN_STAM_R3 IN_VGADEVICE_R3 IN_CSAM_R3 IN_SSM_R3
+ifdef VBOX_WITH_IDT_PATCHING
+tstAsmStructs_DEFS     += VBOX_WITH_IDT_PATCHING
+endif
 tstAsmStructs_INCS      = $(VBOX_PATH_VMM_SRC) $(PATH_TARGET)
 tstAsmStructs_SOURCES   = tstAsmStructs.cpp
@@ -83,4 +92,7 @@
 tstAsmStructsGC_TEMPLATE= VBOXGCEXE
 tstAsmStructsGC_DEFS    = IN_VMM_GC IN_PDM_GC IN_CFGM_GC IN_IOM_GC IN_VM_GC IN_CPUM_GC IN_SELM_GC IN_PGM_GC IN_TRPM_GC IN_MM_GC IN_PDM_GC IN_DBGF_GC IN_PATM_GC IN_DIS_GC IN_STAM_GC IN_VGADEVICE_GC IN_CSAM_GC IN_SSM_GC IN_RRM_GC
+ifdef VBOX_WITH_IDT_PATCHING
+tstAsmStructsGC_DEFS    += VBOX_WITH_IDT_PATCHING
+endif
 tstAsmStructsGC_INCS    = $(VBOX_PATH_VMM_SRC) $(PATH_TARGET)
 tstAsmStructsGC_SOURCES = tstAsmStructs.cpp
