SUPDrvInternal.h revision 5be8500eb3fb70c3164d14707ea12fb35e028fe9
/* $Id$ */
/** @file
* VirtualBox Support Driver - Internal header.
*/
/*
* Copyright (C) 2006-2014 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
#ifndef ___SUPDrvInternal_h
#define ___SUPDrvInternal_h
/*******************************************************************************
* Header Files *
*******************************************************************************/
#ifdef SUPDRV_AGNOSTIC
/* do nothing */
#elif defined(RT_OS_WINDOWS)
# pragma warning(default : 4163)
# else
# endif
# include <memory.h>
#elif defined(RT_OS_LINUX)
# include <generated/autoconf.h>
# else
# ifndef AUTOCONF_INCLUDED
# include <linux/autoconf.h>
# endif
# endif
# if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
# define MODVERSIONS
# include <linux/modversions.h>
# endif
# endif
# endif
# ifndef KBUILD_STR
# define KBUILD_STR(s) s
# else
# define KBUILD_STR(s) #s
# endif
# endif
# include <linux/spinlock.h>
# include <linux/semaphore.h>
# else /* older kernels */
# include <asm/semaphore.h>
# endif /* older kernels */
#elif defined(RT_OS_DARWIN)
#elif defined(RT_OS_FREEBSD)
# define memset libkern_memset /** @todo these are just hacks to get it compiling, check out later. */
# define memcmp libkern_memcmp
# define strchr libkern_strchr
# define strrchr libkern_strrchr
# define ffsl libkern_ffsl
# define fls libkern_fls
# define flsl libkern_flsl
#elif defined(RT_OS_SOLARIS)
#else
# error "unsupported OS."
#endif
#include "SUPDrvIOC.h"
#include "SUPDrvIDC.h"
/*******************************************************************************
* Defined Constants And Macros *
*******************************************************************************/
/*
* Hardcoded cookies.
*/
#ifdef RT_OS_WINDOWS
/** Use a normal mutex for the loader so we remain at the same IRQL after
* taking it.
* @todo fix the mutex implementation on linux and make this the default. */
# define SUPDRV_USE_MUTEX_FOR_LDR
/** Use a normal mutex for the GIP so we remain at the same IRQL after
* taking it.
* @todo fix the mutex implementation on linux and make this the default. */
# define SUPDRV_USE_MUTEX_FOR_GIP
#endif
/**
* OS debug print macro.
*/
#define OSDBGPRINT(a) SUPR0Printf a
/** Debug printf macro shared with the ring-3 part. */
#ifdef DEBUG_bird
# define SUP_DPRINTF(a) SUPR0Printf a
#else
# define SUP_DPRINTF(a) do { } while (0)
#endif
/** @name Context values for the per-session handle tables.
* The context value is used to distinguish between the different kinds of
* handles, making the handle table API do all the work.
* @{ */
/** Handle context value for single release event handles. */
/** Handle context value for multiple release event handles. */
/** @} */
/**
* Validates a session pointer.
*
* @param pSession The session.
*/
#define SUP_IS_SESSION_VALID(pSession) \
/**
* Validates a device extension pointer.
*
* @param pDevExt The device extension.
*/
#define SUP_IS_DEVEXT_VALID(pDevExt) \
/** @def SUPDRV_WITH_MSR_PROBER
* Enables the SUP_IOCTL_MSR_PROBER function.
* By default, only enabled in DEBUG builds as it's a sensitive feature.
*/
# define SUPDRV_WITH_MSR_PROBER
#endif
/** @def SUPDRV_WITHOUT_MSR_PROBER
* Executive overide for disabling the SUP_IOCTL_MSR_PROBER function.
*/
#ifdef SUPDRV_WITHOUT_MSR_PROBER
#endif
#if 1
/** Use a dedicated kernel thread to service TSC-delta measurement requests.
* @todo Test on servers with many CPUs and sockets. */
#define SUPDRV_USE_TSC_DELTA_THREAD
#endif
/*******************************************************************************
* Structures and Typedefs *
*******************************************************************************/
/** Pointer to the device extension. */
typedef struct SUPDRVDEVEXT *PSUPDRVDEVEXT;
#ifdef SUPDRV_USE_TSC_DELTA_THREAD
/**
* TSC-delta measurement thread state machine.
*/
typedef enum SUPDRVTSCDELTATHREADSTATE
{
/** Uninitialized/invalid value. */
/** The thread is being created. */
/** The thread is listening for events. */
/** The thread is sleeping before starting a measurement. */
/** The thread is currently servicing a measurement request. */
/** The thread is terminating. */
/** The thread is butchered due to an unexpected error. */
/** The thread is destroyed. */
/** The usual 32-bit blowup hack. */
kTscDeltaThreadState_32BitHack = 0x7fffffff
#endif
/**
* Memory reference types.
*/
typedef enum
{
/** Unused entry */
MEMREF_TYPE_UNUSED = 0,
/** Locked memory (r3 mapping only). */
/** Continuous memory block (r3 and r0 mapping). */
/** Low memory block (r3 and r0 mapping). */
/** Memory block (r3 and r0 mapping). */
/** Locked memory (r3 mapping only) allocated by the support driver. */
/** Blow the type up to 32-bit and mark the end. */
MEMREF_TYPE_32BIT_HACK = 0x7fffffff
/**
* Structure used for tracking memory a session
* references in one way or another.
*/
typedef struct SUPDRVMEMREF
{
/** The memory object handle. */
/** The ring-3 mapping memory object handle. */
/** Type of memory. */
/**
* Bundle of locked memory ranges.
*/
typedef struct SUPDRVBUNDLE
{
/** Pointer to the next bundle. */
struct SUPDRVBUNDLE * volatile pNext;
/** Referenced memory. */
/** Number of entries used. */
/**
* Loaded image.
*/
typedef struct SUPDRVLDRIMAGE
{
/** Next in chain. */
struct SUPDRVLDRIMAGE * volatile pNext;
/** Pointer to the image. */
void *pvImage;
/** Pointer to the allocated image buffer.
* pvImage is 32-byte aligned or it may governed by the native loader (this
* member is NULL then). */
void *pvImageAlloc;
/** Size of the image including the tables. This is mainly for verification
* of the load request. */
/** Size of the image. */
/** The number of entries in the symbol table. */
/** Pointer to the symbol table. */
/** The offset of the string table. */
char *pachStrTab;
/** Size of the string table. */
/** Pointer to the optional module initialization callback. */
/** Pointer to the optional module termination callback. */
/** Service request handler. This is NULL for non-service modules. */
/** The ldr image state. (IOCtl code of last operation.) */
/** Usage count. */
/** Pointer to the device extension. */
struct SUPDRVDEVEXT *pDevExt;
#ifdef RT_OS_WINDOWS
/** The section object for the loaded image (fNative=true). */
void *pvNtSectionObj;
/** Lock object. */
#endif
#if defined(RT_OS_SOLARIS) && defined(VBOX_WITH_NATIVE_SOLARIS_LOADING)
/** The Solaris module ID. */
int idSolMod;
/** Pointer to the module control structure. */
struct modctl *pSolModCtl;
#endif
/** Whether it's loaded by the native loader or not. */
bool fNative;
/** Image name. */
char szName[32];
/** Image usage record. */
typedef struct SUPDRVLDRUSAGE
{
/** Next in chain. */
struct SUPDRVLDRUSAGE * volatile pNext;
/** The image. */
/** Load count. */
/**
* Component factory registration record.
*/
typedef struct SUPDRVFACTORYREG
{
/** Pointer to the next registration. */
struct SUPDRVFACTORYREG *pNext;
/** Pointer to the registered factory. */
/** The session owning the factory.
* Used for deregistration and session cleanup. */
/** Length of the name. */
/** Pointer to a component factory registration record. */
typedef SUPDRVFACTORYREG *PSUPDRVFACTORYREG;
/** Pointer to a const component factory registration record. */
typedef SUPDRVFACTORYREG const *PCSUPDRVFACTORYREG;
/**
* Registered object.
* This takes care of reference counting and tracking data for access checks.
*/
typedef struct SUPDRVOBJ
{
/** Magic value (SUPDRVOBJ_MAGIC). */
/** The object type. */
/** Pointer to the next in the global list. */
/** Pointer to the object destructor.
* This may be set to NULL if the image containing the destructor get unloaded. */
/** User argument 1. */
void *pvUser1;
/** User argument 2. */
void *pvUser2;
/** The total sum of all per-session usage. */
/** The creator user id. */
/** The creator group id. */
/** The creator process id. */
} SUPDRVOBJ, *PSUPDRVOBJ;
/** Magic number for SUPDRVOBJ::u32Magic. (Dame Agatha Mary Clarissa Christie). */
/** Dead number magic for SUPDRVOBJ::u32Magic. */
/**
* The per-session object usage record.
*/
typedef struct SUPDRVUSAGE
{
/** Pointer to the next in the list. */
struct SUPDRVUSAGE * volatile pNext;
/** Pointer to the object we're recording usage for. */
/** The usage count. */
} SUPDRVUSAGE, *PSUPDRVUSAGE;
/**
* Per session data.
* This is mainly for memory tracking.
*/
typedef struct SUPDRVSESSION
{
/** Pointer to the device extension. */
/** Session Cookie. */
/** Set if is an unrestricted session, clear if restricted. */
bool fUnrestricted;
/** Set if we're in the hash table, clear if not. Protected by the hash
* table spinlock. */
bool fInHashTable;
/** Reference counter. */
/** Pointer to the next session with the same hash (common hash table).
* Protected by the hash table spinlock. */
/** Pointer to the OS specific session pointer, if available and in use.
* This is atomically set and cleared as the session is inserted and removed
* from the hash table (protected by the session hash table spinlock). */
/** The process (id) of the session. */
/** Which process this session is associated with.
* This is NIL_RTR0PROCESS for kernel sessions and valid for user ones. */
/** The VM associated with the session. */
/** Handle table for IPRT semaphore wrapper APIs.
* This takes care of its own locking in an IRQ safe manner. */
/** Load usage records. (protected by SUPDRVDEVEXT::mtxLdr) */
PSUPDRVLDRUSAGE volatile pLdrUsage;
/** Spinlock protecting the bundles, the GIP members and the
* fProcessCleanupDone flag. It continues to be valid until the last
* reference to the session is released. */
/** The ring-3 mapping of the GIP (readonly). */
/** Set if the session is using the GIP. */
/** Bundle of locked memory objects. */
/** List of generic usage records. (protected by SUPDRVDEVEXT::SpinLock) */
PSUPDRVUSAGE volatile pUsage;
/** The user id of the session. (Set by the OS part.) */
/** The group id of the session. (Set by the OS part.) */
/** Per session tracer specfic data. */
/** The thread currently actively talking to the tracer. (One at the time!) */
/** List of tracepoint providers associated with the session
* (SUPDRVTPPROVIDER). */
/** The number of providers in TpProviders. */
/** The number of threads active in supdrvIOCtl_TracerUmodProbeFire or
* SUPR0TracerUmodProbeFire. */
uint32_t volatile cTpProbesFiring;
/** User tracepoint modules (PSUPDRVTRACKERUMOD). */
/** The user tracepoint module lookup table. */
#ifndef SUPDRV_AGNOSTIC
# if defined(RT_OS_DARWIN)
/** Pointer to the associated org_virtualbox_SupDrvClient object. */
void *pvSupDrvClient;
/** Whether this session has been opened or not. */
bool fOpened;
# endif
# if defined(RT_OS_OS2)
/** The system file number of this session. */
# endif
/** Pointer to the next session with the same hash. */
# endif
# if defined(RT_OS_WINDOWS) && defined(VBOX_WITH_HARDENING)
/** Pointer to the process protection structure for this session. */
struct SUPDRVNTPROTECT *pNtProtect;
# endif
#endif /* !SUPDRV_AGNOSTIC */
/**
* The TSC delta synchronization struct. rounded to cache line size.
*/
typedef union SUPTSCDELTASYNC
{
/** The synchronization variable, holds values GIP_TSC_DELTA_SYNC_*. */
volatile uint32_t u;
/** Padding to cache line size. */
typedef SUPTSCDELTASYNC *PSUPTSCDELTASYNC;
/**
* Device extension.
*/
typedef struct SUPDRVDEVEXT
{
/** Global cookie. */
/** The actual size of SUPDRVSESSION. (SUPDRV_AGNOSTIC) */
/** Spinlock to serialize the initialization, usage counting and objects.
* This is IRQ safe because we want to be able signal semaphores from the
* special HM context (and later maybe interrupt handlers), so we must be able
* to reference and dereference handles when IRQs are disabled. */
/** List of registered objects. Protected by the spinlock. */
PSUPDRVOBJ volatile pObjs;
/** List of free object usage records. */
PSUPDRVUSAGE volatile pUsageFree;
/** Loader mutex.
* This protects pvVMMR0, pvVMMR0Entry, pImages and SUPDRVSESSION::pLdrUsage. */
#ifdef SUPDRV_USE_MUTEX_FOR_LDR
#else
#endif
/** VMM Module 'handle'.
* 0 if the code VMM isn't loaded and Idt are nops. */
void * volatile pvVMMR0;
/** VMMR0EntryInt() pointer. */
/** VMMR0EntryFast() pointer. */
/** VMMR0EntryEx() pointer. */
DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryEx, (PVM pVM, VMCPUID idCpu, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession));
/** Linked list of loaded code. */
PSUPDRVLDRIMAGE volatile pLdrImages;
/** Set if the image loading interface got disabled after loading all needed images */
bool fLdrLockedDown;
/** @name These members for detecting whether an API caller is in ModuleInit.
* Certain APIs are only permitted from ModuleInit, like for instance tracepoint
* registration.
* @{ */
/** The image currently executing its ModuleInit. */
PSUPDRVLDRIMAGE volatile pLdrInitImage;
/** The thread currently executing a ModuleInit function. */
RTNATIVETHREAD volatile hLdrInitThread;
/** @} */
/** GIP mutex.
* Any changes to any of the GIP members requires ownership of this mutex,
* except on driver init and termination. */
#ifdef SUPDRV_USE_MUTEX_FOR_GIP
#else
#endif
/** GIP spinlock protecting GIP members during Mp events.
* This is IRQ safe since be may get MP callbacks in contexts where IRQs are
* disabled (on some platforms). */
/** Pointer to the Global Info Page (GIP). */
/** The physical address of the GIP. */
/** Number of processes using the GIP.
* (The updates are suspend while cGipUsers is 0.)*/
/** The ring-0 memory object handle for the GIP page. */
/** The GIP timer handle. */
/** If non-zero we've successfully called RTTimerRequestSystemGranularity(). */
/** The CPU id of the GIP master.
* This CPU is responsible for the updating the common GIP data. */
RTCPUID volatile idGipMaster;
/** Component factory mutex.
* This protects pComponentFactoryHead and component factory querying. */
/** The head of the list of registered component factories. */
/** Lock protecting The tracer members. */
/** List of tracer providers (SUPDRVTPPROVIDER). */
/** List of zombie tracer providers (SUPDRVTPPROVIDER). */
/** Pointer to the tracer registration record. */
/** The ring-0 session of a native tracer provider. */
/** The image containing the tracer. */
/** The tracer helpers. */
/** The number of session having opened the tracer currently. */
/** The number of threads currently calling into the tracer. */
uint32_t volatile cTracerCallers;
/** Set if the tracer is being unloaded. */
bool fTracerUnloading;
/** Hash table for user tracer modules (SUPDRVVTGCOPY). */
/** @name Session Handle Table.
* @{ */
/** Spinlock protecting apSessionHashTab, cSessions,
* SUPDRVSESSION::ppOsSessionPtr, SUPDRVSESSION::pCommonNextHash, and possibly
* others depending on the OS. */
/** Session hash table hash table. The size of this table must make sense in
* comparison to GVMM_MAX_HANDLES. */
/** The number of open sessions. */
/** @} */
/** @name TSC-delta measurement.
* @{ */
/** TSC reading during start of TSC frequency refinement phase. */
/** Timestamp (in nanosec) during start of TSC frequency refinement phase. */
/** Pointer to the timer used to refine the TSC frequency. */
/** Pointer to the TSC delta sync. struct. */
void *pvTscDeltaSync;
/** The TSC delta measurement initiator Cpu Id. */
RTCPUID volatile idTscDeltaInitiator;
* or offline. */
uint32_t volatile cMpOnOffEvents;
/** Aligned pointer to the TSC delta sync. struct. */
/** @} */
#ifdef SUPDRV_USE_TSC_DELTA_THREAD
/** @name TSC-delta measurement thread.
* @{ */
/** Spinlock protecting enmTscDeltaThreadState. */
/** TSC-delta measurement thread. */
/** The event signalled during state changes to the TSC-delta thread. */
/** The state of the TSC-delta measurement thread. */
/** Thread timeout time before rechecking state in ms. */
/** The set of CPUs we need to take measurements for. */
/** The set of CPUs we have completed taken measurements for. */
/** Whether the TSC-delta measurement was successful. */
int32_t volatile rcTscDelta;
/** @} */
#endif
/*
* Note! The non-agnostic bits must be at the very end of the structure!
*/
#ifndef SUPDRV_AGNOSTIC
# ifdef RT_OS_WINDOWS
/** Callback object returned by ExCreateCallback. */
/** Callback handle returned by ExRegisterCallback. */
# endif
#endif
} SUPDRVDEVEXT;
/** Calculates the index into g_apSessionHashTab.*/
#define SUPDRV_SESSION_HASH(a_pid) ( (a_pid) % RT_ELEMENTS(((SUPDRVDEVEXT *)NULL)->apSessionHashTab) )
/*******************************************************************************
* OS Specific Functions *
*******************************************************************************/
/**
* Called to clean up the session structure before it's freed.
*
* @param pDevExt The device globals.
* @param pSession The session that's being cleaned up.
*/
/**
* Called to let the OS specfic code perform additional insertion work while
* still under the protection of the hash table spinlock.
*
* @param pDevExt The device globals.
* @param pSession The session that was inserted.
* @param pvUser User context specified to the insert call.
*/
void VBOXCALL supdrvOSSessionHashTabInserted(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, void *pvUser);
/**
* Called to let the OS specfic code perform additional removal work while still
* under the protection of the hash table spinlock.
*
* @param pDevExt The device globals.
* @param pSession The session that was removed.
* @param pvUser User context specified to the remove call.
*/
void VBOXCALL supdrvOSSessionHashTabRemoved(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, void *pvUser);
bool VBOXCALL supdrvOSObjCanAccess(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession, const char *pszObjName, int *prc);
bool VBOXCALL supdrvOSAreTscDeltasInSync(void);
bool VBOXCALL supdrvOSSuspendVTxOnCpu(void);
/**
* Try open the image using the native loader.
*
* @returns IPRT status code.
* @retval VERR_NOT_SUPPORTED if native loading isn't supported.
*
* @param pDevExt The device globals.
* @param pImage The image handle. pvImage should be set on
* success, pvImageAlloc can also be set if
* appropriate.
* @param pszFilename The file name - UTF-8, may containing UNIX
* slashes on non-UNIX systems.
*/
int VBOXCALL supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename);
/**
* Notification call indicating that a image is being opened for the first time.
*
* Can be used to log the load address of the image.
*
* @param pDevExt The device globals.
* @param pImage The image handle.
*/
/**
* Validates an entry point address.
*
* Called before supdrvOSLdrLoad.
*
* @returns IPRT status code.
* @param pDevExt The device globals.
* @param pImage The image data (still in the open state).
* @param pv The address within the image.
* @param pbImageBits The image bits as loaded by ring-3.
*/
/**
* Load the image.
*
* @returns IPRT status code.
* @param pDevExt The device globals.
* @param pImage The image data (up to date). Adjust entrypoints
* and exports if necessary.
* @param pbImageBits The image bits as loaded by ring-3.
* @param pReq Pointer to the request packet so that the VMMR0
* entry points can be adjusted.
*/
int VBOXCALL supdrvOSLdrLoad(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const uint8_t *pbImageBits, PSUPLDRLOAD pReq);
/**
* Unload the image.
*
* @param pDevExt The device globals.
* @param pImage The image data (mostly still valid).
*/
#ifdef SUPDRV_WITH_MSR_PROBER
/**
* Tries to read an MSR.
*
* @returns One of the listed VBox status codes.
* @retval VINF_SUCCESS if read successfully, value in *puValue.
* @retval VERR_ACCESS_DENIED if we couldn't read it (GP).
* @retval VERR_NOT_SUPPORTED if not supported.
*
* @param uMsr The MSR to read from.
* @param idCpu The CPU to read the MSR on. NIL_RTCPUID
* indicates any suitable CPU.
* @param puValue Where to return the value.
*/
/**
* Tries to write an MSR.
*
* @returns One of the listed VBox status codes.
* @retval VINF_SUCCESS if written successfully.
* @retval VERR_ACCESS_DENIED if we couldn't write the value to it (GP).
* @retval VERR_NOT_SUPPORTED if not supported.
*
* @param uMsr The MSR to write to.
* @param idCpu The CPU to write the MSR on. NIL_RTCPUID
* indicates any suitable CPU.
* @param uValue The value to write.
*/
/**
* Tries to modify an MSR value.
*
* @returns One of the listed VBox status codes.
* @retval VINF_SUCCESS if succeeded.
* @retval VERR_NOT_SUPPORTED if not supported.
*
* @param idCpu The CPU to modify the MSR on. NIL_RTCPUID
* indicates any suitable CPU.
* @param pReq The request packet with input arguments and
* where to store the results.
*/
#endif /* SUPDRV_WITH_MSR_PROBER */
#if defined(RT_OS_DARWIN)
int VBOXCALL supdrvDarwinResumeSuspendedKbds(void);
#endif
/*******************************************************************************
* Shared Functions *
*******************************************************************************/
/* SUPDrv.c */
int VBOXCALL supdrvIOCtl(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPREQHDR pReqHdr, size_t cbReq);
int VBOXCALL supdrvIOCtlFast(uintptr_t uIOCtl, VMCPUID idCpu, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
int VBOXCALL supdrvIDC(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPDRVIDCREQHDR pReqHdr);
int VBOXCALL supdrvCreateSession(PSUPDRVDEVEXT pDevExt, bool fUser, bool fUnrestricted, PSUPDRVSESSION *ppSession);
int VBOXCALL supdrvSessionHashTabInsert(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPDRVSESSION *ppOsSessionPtr, void *pvUser);
int VBOXCALL supdrvSessionHashTabRemove(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, void *pvUser);
PSUPDRVSESSION VBOXCALL supdrvSessionHashTabLookup(PSUPDRVDEVEXT pDevExt, RTPROCESS Process, RTR0PROCESS R0Process,
int VBOXCALL supdrvIOCtl_TracerUmodDeregister(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, RTR3PTR R3PtrVtgHdr);
void VBOXCALL supdrvIOCtl_TracerUmodProbeFire(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPDRVTRACERUSRCTX pCtx);
int VBOXCALL supdrvIOCtl_TracerOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, uint32_t uCookie, uintptr_t uArg);
int VBOXCALL supdrvIOCtl_TracerIOCtl(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, uintptr_t uCmd, uintptr_t uArg, int32_t *piRetVal);
extern PFNRT g_pfnSupdrvProbeFireKernel;
DECLASM(void) supdrvTracerProbeFireStub(void);
#ifdef VBOX_WITH_NATIVE_DTRACE
#endif
#endif