VirtualBox

Ignore:
Timestamp:
Sep 15, 2007 9:55:14 PM (17 years ago)
Author:
vboxsync
Message:

inverted VBOX_WITHOUT_IDT_PATCHING.

Location:
trunk/src/VBox/HostDrivers/Support
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/Makefile.kmk

    r4547 r4829  
    6565endif
    6666SUPR3_DEFS          = IN_SUP_R3 IN_RT_R3
     67ifdef VBOX_WITH_IDT_PATCHING
     68SUPR3_DEFS         += VBOX_WITH_IDT_PATCHING
     69endif
    6770SUPR3_INCS         := $(PATH_SUB_CURRENT)
    6871SUPR3_INCS.l4       = $(L4_INCDIR)
     
    9598endif
    9699VBoxDrv_DEFS          = IN_RT_R0 IN_SUP_R0 USE_NEW_OS_INTERFACE_FOR_MM
     100ifdef VBOX_WITH_IDT_PATCHING
     101VBoxDrv_DEFS         += VBOX_WITH_IDT_PATCHING
     102endif
    97103VBoxDrv_SDKS          = W2K3DDK WINPSDKINCS
    98104VBoxDrv_INCS         := $(PATH_SUB_CURRENT)
     
    144150vboxdrv_TEMPLATE      = VBOXR0DRV
    145151vboxdrv_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
     152ifdef VBOX_WITH_IDT_PATCHING
     153vboxdrv_DEFS         += VBOX_WITH_IDT_PATCHING
     154endif
    146155vboxdrv_INCS         := $(PATH_SUB_CURRENT)
    147156vboxdrv_LIBS          = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
     
    163172VBoxDrv_TEMPLATE      = VBOXR0DRV
    164173VBoxDrv_DEFS          = IN_RT_R0 IN_SUP_R0 USE_NEW_OS_INTERFACE
     174ifdef VBOX_WITH_IDT_PATCHING
     175VBoxDrv_DEFS         += VBOX_WITH_IDT_PATCHING
     176endif
    165177VBoxDrv_DEFS         += DEBUG_DARWIN_GIP
    166178VBoxDrv_INCS         := $(PATH_SUB_CURRENT)
     
    201213VBoxDrv_TEMPLATE      = VBOXR0DRV
    202214VBoxDrv_DEFS          = IN_RT_R0 IN_SUP_R0 USE_NEW_OS_INTERFACE
     215ifdef VBOX_WITH_IDT_PATCHING
     216VBoxDrv_DEFS         += VBOX_WITH_IDT_PATCHING
     217endif
    203218VBoxDrv_INCS         := $(PATH_SUB_CURRENT)
    204219#VBoxDrv_LDFLAGS       = -s -t -v
     
    217232VBoxDrvLib_NOINST     = 1
    218233VBoxDrvLib_DEFS       = IN_RT_R0 IN_SUP_R0 USE_NEW_OS_INTERFACE
     234ifdef VBOX_WITH_IDT_PATCHING
     235VBoxDrv_DEFS         += VBOX_WITH_IDT_PATCHING
     236endif
    219237VBoxDrvLib_INCS      := \
    220238        $(PATH_SUB_CURRENT) \
     
    233251vboxdrv_TEMPLATE      = VBOXR0DRV
    234252vboxdrv_DEFS          = IN_RT_R0 IN_SUP_R0 USE_NEW_OS_INTERFACE
     253ifdef VBOX_WITH_IDT_PATCHING
     254vboxdrv_DEFS         += VBOX_WITH_IDT_PATCHING
     255endif
    235256vboxdrv_INCS         := $(PATH_SUB_CURRENT)
    236257vboxdrv_LIBS          = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
     
    247268vboxdrv_TEMPLATE      = VBOXR0DRV
    248269vboxdrv_DEFS          = IN_RT_R0 IN_SUP_R0 USE_NEW_OS_INTERFACE
     270ifdef VBOX_WITH_IDT_PATCHING
     271vboxdrv_DEFS         += VBOX_WITH_IDT_PATCHING
     272endif
    249273vboxdrv_INCS         := $(PATH_SUB_CURRENT)
    250274vboxdrv_LIBS          = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
  • trunk/src/VBox/HostDrivers/Support/SUPDRV.h

    r4812 r4829  
    251251typedef struct SUPDRVDEVEXT *PSUPDRVDEVEXT;
    252252
    253 #ifndef VBOX_WITHOUT_IDT_PATCHING
     253#ifdef VBOX_WITH_IDT_PATCHING
    254254
    255255/**
     
    339339} SUPDRVPATCHUSAGE, *PSUPDRVPATCHUSAGE;
    340340
    341 #endif /* !VBOX_WITHOUT_IDT_PATCHING */
     341#endif /* VBOX_WITH_IDT_PATCHING */
    342342
    343343
     
    562562    /** Load usage records. (protected by SUPDRVDEVEXT::mtxLdr) */
    563563    PSUPDRVLDRUSAGE volatile    pLdrUsage;
    564 #ifndef VBOX_WITHOUT_IDT_PATCHING
     564#ifdef VBOX_WITH_IDT_PATCHING
    565565    /** Patch usage records. (protected by SUPDRVDEVEXT::SpinLock) */
    566566    PSUPDRVPATCHUSAGE volatile  pPatchUsage;
     
    615615    RTSPINLOCK              Spinlock;
    616616
    617 #ifndef VBOX_WITHOUT_IDT_PATCHING
     617#ifdef VBOX_WITH_IDT_PATCHING
    618618    /** List of patches. */
    619619    PSUPDRVPATCH volatile   pIdtPatches;
  • trunk/src/VBox/HostDrivers/Support/SUPDRVShared.c

    r4821 r4829  
    154154static int      supdrvMemAdd(PSUPDRVMEMREF pMem, PSUPDRVSESSION pSession);
    155155static int      supdrvMemRelease(PSUPDRVSESSION pSession, RTHCUINTPTR uPtr, SUPDRVMEMREFTYPE eType);
    156 #ifndef VBOX_WITHOUT_IDT_PATCHING
     156#ifdef VBOX_WITH_IDT_PATCHING
    157157static int      supdrvIOCtl_IdtInstall(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPIDTINSTALL pReq);
    158158static PSUPDRVPATCH supdrvIdtPatchOne(PSUPDRVDEVEXT pDevExt, PSUPDRVPATCH pPatch);
     
    160160static void     supdrvIdtRemoveOne(PSUPDRVDEVEXT pDevExt, PSUPDRVPATCH pPatch);
    161161static void     supdrvIdtWrite(volatile void *pvIdtEntry, const SUPDRVIDTE *pNewIDTEntry);
    162 #endif /* !VBOX_WITHOUT_IDT_PATCHING */
     162#endif /* VBOX_WITH_IDT_PATCHING */
    163163static int      supdrvIOCtl_LdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPLDROPEN pReq);
    164164static int      supdrvIOCtl_LdrLoad(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPLDRLOAD pReq);
     
    233233void VBOXCALL supdrvDeleteDevExt(PSUPDRVDEVEXT pDevExt)
    234234{
    235 #ifndef VBOX_WITHOUT_IDT_PATCHING
     235#ifdef VBOX_WITH_IDT_PATCHING
    236236    PSUPDRVPATCH        pPatch;
    237237#endif
     
    252252     * Free lists.
    253253     */
    254 #ifndef VBOX_WITHOUT_IDT_PATCHING
     254#ifdef VBOX_WITH_IDT_PATCHING
    255255    /* patches */
    256256    /** @todo make sure we don't uninstall patches which has been patched by someone else. */
     
    263263        RTMemExecFree(pvFree);
    264264    }
    265 #endif /* !VBOX_WITHOUT_IDT_PATCHING */
     265#endif /* VBOX_WITH_IDT_PATCHING */
    266266
    267267    /* objects. */
     
    384384    RTLogSetDefaultInstanceThread(NULL, (uintptr_t)pSession);
    385385
    386 #ifndef VBOX_WITHOUT_IDT_PATCHING
     386#ifdef VBOX_WITH_IDT_PATCHING
    387387    /*
    388388     * Uninstall any IDT patches installed for this session.
     
    796796
    797797            /* execute */
    798 #ifndef VBOX_WITHOUT_IDT_PATCHING
     798#ifdef VBOX_WITH_IDT_PATCHING
    799799            pReq->Hdr.rc = supdrvIOCtl_IdtInstall(pDevExt, pSession, pReq);
    800800#else
     
    812812
    813813            /* execute */
    814 #ifndef VBOX_WITHOUT_IDT_PATCHING
     814#ifdef VBOX_WITH_IDT_PATCHING
    815815            pReq->Hdr.rc = supdrvIOCtl_IdtRemoveAll(pDevExt, pSession);
    816816#else
     
    24252425
    24262426
    2427 #ifndef VBOX_WITHOUT_IDT_PATCHING
     2427#ifdef VBOX_WITH_IDT_PATCHING
    24282428/**
    24292429 * Install IDT for the current CPU.
     
    30843084    ASMSetFlags(uFlags);
    30853085}
    3086 #endif /* !VBOX_WITHOUT_IDT_PATCHING */
     3086#endif /* VBOX_WITH_IDT_PATCHING */
    30873087
    30883088
     
    34603460    if (!pDevExt->pvVMMR0)
    34613461    {
    3462 #ifndef VBOX_WITHOUT_IDT_PATCHING
     3462#ifdef VBOX_WITH_IDT_PATCHING
    34633463        PSUPDRVPATCH pPatch;
    34643464#endif
     
    34713471        pDevExt->pfnVMMR0EntryFast  = pvVMMR0EntryFast;
    34723472        pDevExt->pfnVMMR0EntryEx    = pvVMMR0EntryEx;
    3473 #ifndef VBOX_WITHOUT_IDT_PATCHING
     3473#ifdef VBOX_WITH_IDT_PATCHING
    34743474        for (pPatch = pDevExt->pIdtPatches; pPatch; pPatch = pPatch->pNext)
    34753475        {
     
    34813481# endif
    34823482        }
    3483 #endif /* !VBOX_WITHOUT_IDT_PATCHING */
     3483#endif /* VBOX_WITH_IDT_PATCHING */
    34843484    }
    34853485    else
     
    35083508static void supdrvLdrUnsetR0EP(PSUPDRVDEVEXT pDevExt)
    35093509{
    3510 #ifndef VBOX_WITHOUT_IDT_PATCHING
     3510#ifdef VBOX_WITH_IDT_PATCHING
    35113511    PSUPDRVPATCH pPatch;
    35123512#endif
     
    35173517    pDevExt->pfnVMMR0EntryEx    = NULL;
    35183518
    3519 #ifndef VBOX_WITHOUT_IDT_PATCHING
     3519#ifdef VBOX_WITH_IDT_PATCHING
    35203520    for (pPatch = pDevExt->pIdtPatches; pPatch; pPatch = pPatch->pNext)
    35213521    {
     
    35283528# endif
    35293529    }
    3530 #endif /* !VBOX_WITHOUT_IDT_PATCHING */
     3530#endif /* VBOX_WITH_IDT_PATCHING */
    35313531}
    35323532
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r4815 r4829  
    102102static PSUPQUERYFUNCS g_pFunctions;
    103103
    104 #ifndef VBOX_WITHOUT_IDT_PATCHING
     104#ifdef VBOX_WITH_IDT_PATCHING
    105105/** The negotiated interrupt number. */
    106106static uint8_t      g_u8Interrupt = 3;
     
    123123static int supInitFake(PSUPDRVSESSION *ppSession);
    124124static int supLoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase);
    125 #ifndef VBOX_WITHOUT_IDT_PATCHING
     125#ifdef VBOX_WITH_IDT_PATCHING
    126126static int supInstallIDTE(void);
    127127#endif
     
    360360        if (ppSession)
    361361            *ppSession = g_pSession;
    362 #ifndef VBOX_WITHOUT_IDT_PATCHING
     362#ifdef VBOX_WITH_IDT_PATCHING
    363363        Assert(g_u8Interrupt == 3);
    364364#endif
     
    412412        g_u32Cookie         = 0;
    413413        g_u32SessionCookie  = 0;
    414 #ifndef VBOX_WITHOUT_IDT_PATCHING
     414#ifdef VBOX_WITH_IDT_PATCHING
    415415        g_u8Interrupt       = 3;
    416416#endif
     
    552552SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, unsigned uOperation, void *pvArg)
    553553{
    554 #ifndef VBOX_WITHOUT_IDT_PATCHING
     554#if defined(VBOX_WITH_IDT_PATCHING) && !defined(RT_OS_OS2)
    555555    return g_pfnCallVMMR0(pVMR0, uOperation, pvArg);
    556556
     
    10651065     */
    10661066    int rc = supLoadModule(pszFilename, pszModule, ppvImageBase);
    1067 #ifndef VBOX_WITHOUT_IDT_PATCHING
     1067#ifdef VBOX_WITH_IDT_PATCHING
    10681068    if (    RT_SUCCESS(rc)
    10691069        &&  !strcmp(pszModule, "VMMR0.r0"))
     
    10731073            SUPFreeModule(*ppvImageBase);
    10741074    }
    1075 #endif /* VBOX_WITHOUT_IDT_PATCHING */
     1075#endif /* VBOX_WITH_IDT_PATCHING */
    10761076
    10771077    return rc;
     
    10791079
    10801080
    1081 #ifndef VBOX_WITHOUT_IDT_PATCHING
     1081#ifdef VBOX_WITH_IDT_PATCHING
    10821082/**
    10831083 * Generates the code for calling the interrupt gate.
     
    12741274    return rc;
    12751275}
    1276 #endif /* !VBOX_WITHOUT_IDT_PATCHING */
     1276#endif /* VBOX_WITH_IDT_PATCHING */
    12771277
    12781278
     
    16361636    if (RT_UNLIKELY(g_u32FakeMode))
    16371637    {
    1638 #ifndef VBOX_WITHOUT_IDT_PATCHING
     1638#ifdef VBOX_WITH_IDT_PATCHING
    16391639        g_u8Interrupt = 3;
    16401640        RTMemExecFree(*(void **)&g_pfnCallVMMR0);
     
    16451645    }
    16461646
    1647 #ifndef VBOX_WITHOUT_IDT_PATCHING
     1647#ifdef VBOX_WITH_IDT_PATCHING
    16481648    /*
    16491649     * There is one special module. When this is freed we'll
     
    16711671        g_pfnCallVMMR0 = NULL;
    16721672    }
    1673 #endif /* VBOX_WITHOUT_IDT_PATCHING */
     1673#endif /* VBOX_WITH_IDT_PATCHING */
    16741674
    16751675    /*
  • trunk/src/VBox/HostDrivers/Support/linux/Makefile

    r4174 r4829  
    117117 export INCL
    118118endif
    119 KFLAGS   := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0
     119KFLAGS   := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX_WITH_IDT_PATCHING
    120120ifndef CONFIG_VBOXDRV_FIXEDMAJOR
    121121 KFLAGS  += -DCONFIG_VBOXDRV_AS_MISC
  • trunk/src/VBox/HostDrivers/Support/testcase/Makefile.kmk

    r4071 r4829  
    66#
    77#  Copyright (C) 2006-2007 innotek GmbH
    8 # 
     8#
    99#  This file is part of VirtualBox Open Source Edition (OSE), as
    1010#  available from http://www.virtualbox.org. This file is free software;
     
    4545tstInt_SOURCES        = tstInt.cpp
    4646tstInt_LIBS           = $(LIB_RUNTIME)
     47ifdef VBOX_WITH_IDT_PATCHING
     48tstInt_DEFS          += VBOX_WITH_IDT_PATCHING
     49endif
    4750
    4851tstContiguous_TEMPLATE= VBOXR3TSTEXE
  • trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp

    r4811 r4829  
    148148                                 i, NanoSecs, Ticks, NanoSecs / i, Ticks / i, MinTicks);
    149149
    150 #ifndef VBOX_WITHOUT_IDT_PATCHING
     150#ifdef VBOX_WITH_IDT_PATCHING
    151151                        /*
    152152                         * The fast path.
     
    176176                        RTPrintf("tstInt: SUPCallVMMR0Fast - %d iterations in %llu ns / %llu ticks. %llu ns / %#llu ticks per iteration. Min %llu ticks.\n",
    177177                                 i, NanoSecs, Ticks, NanoSecs / i, Ticks / i, MinTicks);
    178 #endif /* !VBOX_WITHOUT_IDT_PATCHING */
     178#endif /* VBOX_WITH_IDT_PATCHING */
    179179
    180180                        /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette