VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h@ 67954

Last change on this file since 67954 was 67137, checked in by vboxsync, 7 years ago

HostDrivers/Support, VMM: bugref:8864: On Linux 4.12 the GDT is mapped read-only. The writable-mapped GDT is available and is used for clearing the TSS BUSY descriptor bit and for LTR.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 40.0 KB
RevLine 
[45188]1/* $Id: SUPDrvInternal.h 67137 2017-05-30 08:05:23Z vboxsync $ */
[1]2/** @file
[3537]3 * VirtualBox Support Driver - Internal header.
[1]4 */
5
6/*
[62490]7 * Copyright (C) 2006-2016 Oracle Corporation
[1]8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
[5999]12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
[1]25 */
26
[10254]27#ifndef ___SUPDrvInternal_h
28#define ___SUPDrvInternal_h
[1]29
30
31/*******************************************************************************
32* Header Files *
33*******************************************************************************/
34#include <VBox/cdefs.h>
35#include <VBox/types.h>
[40602]36#include <VBox/sup.h>
37
[1]38#include <iprt/assert.h>
[40602]39#include <iprt/list.h>
[10250]40#include <iprt/memobj.h>
41#include <iprt/time.h>
42#include <iprt/timer.h>
43#include <iprt/string.h>
44#include <iprt/err.h>
[1]45
[23725]46#ifdef SUPDRV_AGNOSTIC
47/* do nothing */
[1]48
[23725]49#elif defined(RT_OS_WINDOWS)
[62664]50# include <iprt/nt/nt.h>
[1]51# include <memory.h>
52
[3672]53#elif defined(RT_OS_LINUX)
[35647]54# include <linux/version.h>
[42784]55# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
[35647]56# include <generated/autoconf.h>
57# else
58# ifndef AUTOCONF_INCLUDED
59# include <linux/autoconf.h>
60# endif
[25591]61# endif
[1]62# if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
63# define MODVERSIONS
64# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 71)
65# include <linux/modversions.h>
66# endif
67# endif
68# ifndef KBUILD_STR
69# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
70# define KBUILD_STR(s) s
71# else
72# define KBUILD_STR(s) #s
73# endif
74# endif
75# include <linux/string.h>
76# include <linux/spinlock.h>
77# include <linux/slab.h>
[10935]78# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
79# include <linux/semaphore.h>
80# else /* older kernels */
81# include <asm/semaphore.h>
82# endif /* older kernels */
[1563]83# include <linux/timer.h>
[1]84
[3672]85#elif defined(RT_OS_DARWIN)
[1]86# include <libkern/libkern.h>
87# include <iprt/string.h>
88
[3672]89#elif defined(RT_OS_OS2)
[1193]90
[3672]91#elif defined(RT_OS_FREEBSD)
[16029]92# define memset libkern_memset /** @todo these are just hacks to get it compiling, check out later. */
93# define memcmp libkern_memcmp
94# define strchr libkern_strchr
95# define strrchr libkern_strrchr
96# define ffsl libkern_ffsl
97# define fls libkern_fls
98# define flsl libkern_flsl
[3621]99# include <sys/libkern.h>
[16029]100# undef memset
101# undef memcmp
102# undef strchr
103# undef strrchr
104# undef ffs
105# undef ffsl
106# undef fls
107# undef flsl
[3621]108# include <iprt/string.h>
109
[3888]110#elif defined(RT_OS_SOLARIS)
[4474]111# include <sys/cmn_err.h>
[3888]112# include <iprt/string.h>
113
[1]114#else
115# error "unsupported OS."
116#endif
117
[10256]118#include "SUPDrvIOC.h"
[10263]119#include "SUPDrvIDC.h"
[1]120
121
122
123/*******************************************************************************
124* Defined Constants And Macros *
125*******************************************************************************/
126/*
127 * Hardcoded cookies.
128 */
129#define BIRD 0x64726962 /* 'bird' */
130#define BIRD_INV 0x62697264 /* 'drib' */
131
132
[25465]133#ifdef RT_OS_WINDOWS
[25307]134/** Use a normal mutex for the loader so we remain at the same IRQL after
135 * taking it.
136 * @todo fix the mutex implementation on linux and make this the default. */
137# define SUPDRV_USE_MUTEX_FOR_LDR
[1]138
[25461]139/** Use a normal mutex for the GIP so we remain at the same IRQL after
140 * taking it.
141 * @todo fix the mutex implementation on linux and make this the default. */
142# define SUPDRV_USE_MUTEX_FOR_GIP
[1]143#endif
144
145
[25465]146/**
147 * OS debug print macro.
[1]148 */
[25465]149#define OSDBGPRINT(a) SUPR0Printf a
[1]150
[51770]151/** Debug printf macro shared with the ring-3 part. */
152#ifdef DEBUG_bird
153# define SUP_DPRINTF(a) SUPR0Printf a
154#else
155# define SUP_DPRINTF(a) do { } while (0)
156#endif
[1]157
[51770]158
[19866]159/** @name Context values for the per-session handle tables.
[33540]160 * The context value is used to distinguish between the different kinds of
[19866]161 * handles, making the handle table API do all the work.
162 * @{ */
163/** Handle context value for single release event handles. */
164#define SUPDRV_HANDLE_CTX_EVENT ((void *)(uintptr_t)(SUPDRVOBJTYPE_SEM_EVENT))
165/** Handle context value for multiple release event handles. */
166#define SUPDRV_HANDLE_CTX_EVENT_MULTI ((void *)(uintptr_t)(SUPDRVOBJTYPE_SEM_EVENT_MULTI))
167/** @} */
[1]168
[19866]169
[23726]170/**
171 * Validates a session pointer.
172 *
173 * @returns true/false accordingly.
174 * @param pSession The session.
175 */
176#define SUP_IS_SESSION_VALID(pSession) \
177 ( VALID_PTR(pSession) \
178 && pSession->u32Cookie == BIRD_INV)
179
[44188]180/**
181 * Validates a device extension pointer.
182 *
183 * @returns true/false accordingly.
184 * @param pDevExt The device extension.
185 */
186#define SUP_IS_DEVEXT_VALID(pDevExt) \
187 ( VALID_PTR(pDevExt)\
188 && pDevExt->u32Cookie == BIRD)
[23726]189
[44188]190
[49634]191/** @def SUPDRV_WITH_MSR_PROBER
192 * Enables the SUP_IOCTL_MSR_PROBER function.
193 * By default, only enabled in DEBUG builds as it's a sensitive feature.
194 */
195#if defined(DEBUG) && !defined(SUPDRV_WITH_MSR_PROBER) && !defined(SUPDRV_WITHOUT_MSR_PROBER)
196# define SUPDRV_WITH_MSR_PROBER
197#endif
198
199/** @def SUPDRV_WITHOUT_MSR_PROBER
200 * Executive overide for disabling the SUP_IOCTL_MSR_PROBER function.
201 */
202#ifdef SUPDRV_WITHOUT_MSR_PROBER
203# undef SUPDRV_WITH_MSR_PROBER
204#endif
205
[58340]206#ifdef DOXYGEN_RUNNING
207# define SUPDRV_WITH_MSR_PROBER
208# define SUPDRV_WITHOUT_MSR_PROBER
209#endif
210
[54306]211#if 1
[58340]212/** @def SUPDRV_USE_TSC_DELTA_THREAD
213 * Use a dedicated kernel thread to service TSC-delta measurement requests.
214 * @todo Test on servers with many CPUs and sockets. */
215# define SUPDRV_USE_TSC_DELTA_THREAD
[53054]216#endif
[49634]217
[58340]218
[1]219/*******************************************************************************
220* Structures and Typedefs *
221*******************************************************************************/
222/** Pointer to the device extension. */
223typedef struct SUPDRVDEVEXT *PSUPDRVDEVEXT;
224
[53054]225#ifdef SUPDRV_USE_TSC_DELTA_THREAD
226/**
227 * TSC-delta measurement thread state machine.
228 */
[54290]229typedef enum SUPDRVTSCDELTATHREADSTATE
[53054]230{
231 /** Uninitialized/invalid value. */
[54290]232 kTscDeltaThreadState_Invalid = 0,
[54315]233 /** The thread is being created.
234 * Next state: Listening, Butchered, Terminating */
[54290]235 kTscDeltaThreadState_Creating,
[54315]236 /** The thread is listening for events.
237 * Previous state: Creating, Measuring
238 * Next state: WaitAndMeasure, Butchered, Terminated */
[54290]239 kTscDeltaThreadState_Listening,
[54315]240 /** The thread is sleeping before starting a measurement.
241 * Previous state: Listening, Measuring
242 * Next state: Measuring, Butchered, Terminating
243 * @remarks The thread won't enter this state on its own, it is put into this
244 * state by the GIP timer, the CPU online callback and by the
245 * SUP_IOCTL_TSC_DELTA_MEASURE code. */
[54290]246 kTscDeltaThreadState_WaitAndMeasure,
[54315]247 /** The thread is currently servicing a measurement request.
248 * Previous state: WaitAndMeasure
249 * Next state: Listening, WaitAndMeasure, Terminate */
[54290]250 kTscDeltaThreadState_Measuring,
[54315]251 /** The thread is terminating.
252 * @remarks The thread won't enter this state on its own, is put into this state
253 * by supdrvTscDeltaTerm. */
[54290]254 kTscDeltaThreadState_Terminating,
[54315]255 /** The thread is butchered due to an unexpected error.
256 * Previous State: Creating, Listening, WaitAndMeasure */
[54290]257 kTscDeltaThreadState_Butchered,
[54315]258 /** The thread is destroyed (final).
259 * Previous state: Terminating */
[54290]260 kTscDeltaThreadState_Destroyed,
[53054]261 /** The usual 32-bit blowup hack. */
[54290]262 kTscDeltaThreadState_32BitHack = 0x7fffffff
[54315]263} SUPDRVTSCDELTATHREADSTATE;
264#endif /* SUPDRV_USE_TSC_DELTA_THREAD */
[1]265
266/**
267 * Memory reference types.
268 */
269typedef enum
270{
271 /** Unused entry */
272 MEMREF_TYPE_UNUSED = 0,
273 /** Locked memory (r3 mapping only). */
274 MEMREF_TYPE_LOCKED,
[33540]275 /** Continuous memory block (r3 and r0 mapping). */
[1]276 MEMREF_TYPE_CONT,
277 /** Low memory block (r3 and r0 mapping). */
278 MEMREF_TYPE_LOW,
279 /** Memory block (r3 and r0 mapping). */
280 MEMREF_TYPE_MEM,
[4755]281 /** Locked memory (r3 mapping only) allocated by the support driver. */
[14575]282 MEMREF_TYPE_PAGE,
[1]283 /** Blow the type up to 32-bit and mark the end. */
[35494]284 MEMREF_TYPE_32BIT_HACK = 0x7fffffff
[1]285} SUPDRVMEMREFTYPE, *PSUPDRVMEMREFTYPE;
286
287
288/**
289 * Structure used for tracking memory a session
290 * references in one way or another.
291 */
292typedef struct SUPDRVMEMREF
293{
294 /** The memory object handle. */
[14332]295 RTR0MEMOBJ MemObj;
[1]296 /** The ring-3 mapping memory object handle. */
[14332]297 RTR0MEMOBJ MapObjR3;
[1]298 /** Type of memory. */
[14332]299 SUPDRVMEMREFTYPE eType;
[1]300} SUPDRVMEMREF, *PSUPDRVMEMREF;
301
302
303/**
304 * Bundle of locked memory ranges.
305 */
306typedef struct SUPDRVBUNDLE
307{
308 /** Pointer to the next bundle. */
[14332]309 struct SUPDRVBUNDLE * volatile pNext;
[1]310 /** Referenced memory. */
[14332]311 SUPDRVMEMREF aMem[64];
[1]312 /** Number of entries used. */
313 uint32_t volatile cUsed;
314} SUPDRVBUNDLE, *PSUPDRVBUNDLE;
315
316
317/**
318 * Loaded image.
319 */
320typedef struct SUPDRVLDRIMAGE
321{
322 /** Next in chain. */
323 struct SUPDRVLDRIMAGE * volatile pNext;
324 /** Pointer to the image. */
[14332]325 void *pvImage;
[25258]326 /** Pointer to the allocated image buffer.
327 * pvImage is 32-byte aligned or it may governed by the native loader (this
328 * member is NULL then). */
329 void *pvImageAlloc;
330 /** Size of the image including the tables. This is mainly for verification
331 * of the load request. */
332 uint32_t cbImageWithTabs;
333 /** Size of the image. */
334 uint32_t cbImageBits;
335 /** The number of entries in the symbol table. */
336 uint32_t cSymbols;
337 /** Pointer to the symbol table. */
338 PSUPLDRSYM paSymbols;
339 /** The offset of the string table. */
340 char *pachStrTab;
341 /** Size of the string table. */
342 uint32_t cbStrTab;
[1]343 /** Pointer to the optional module initialization callback. */
[14332]344 PFNR0MODULEINIT pfnModuleInit;
[1]345 /** Pointer to the optional module termination callback. */
[14332]346 PFNR0MODULETERM pfnModuleTerm;
347 /** Service request handler. This is NULL for non-service modules. */
348 PFNSUPR0SERVICEREQHANDLER pfnServiceReqHandler;
[33540]349 /** The ldr image state. (IOCtl code of last operation.) */
[14332]350 uint32_t uState;
[1]351 /** Usage count. */
[14332]352 uint32_t volatile cUsage;
[40636]353 /** Pointer to the device extension. */
354 struct SUPDRVDEVEXT *pDevExt;
[25278]355#ifdef RT_OS_WINDOWS
[25262]356 /** The section object for the loaded image (fNative=true). */
357 void *pvNtSectionObj;
[25308]358 /** Lock object. */
359 RTR0MEMOBJ hMemLock;
[25278]360#endif
[37228]361#if defined(RT_OS_SOLARIS) && defined(VBOX_WITH_NATIVE_SOLARIS_LOADING)
362 /** The Solaris module ID. */
363 int idSolMod;
364 /** Pointer to the module control structure. */
365 struct modctl *pSolModCtl;
366#endif
[58872]367#ifdef RT_OS_LINUX
368 /** Hack for seeing the module in perf, dtrace and other stack crawlers. */
369 struct module *pLnxModHack;
370#endif
[25258]371 /** Whether it's loaded by the native loader or not. */
372 bool fNative;
[1]373 /** Image name. */
[14332]374 char szName[32];
[1]375} SUPDRVLDRIMAGE, *PSUPDRVLDRIMAGE;
376
377
378/** Image usage record. */
379typedef struct SUPDRVLDRUSAGE
380{
381 /** Next in chain. */
382 struct SUPDRVLDRUSAGE * volatile pNext;
383 /** The image. */
[14332]384 PSUPDRVLDRIMAGE pImage;
[1]385 /** Load count. */
[14332]386 uint32_t volatile cUsage;
[1]387} SUPDRVLDRUSAGE, *PSUPDRVLDRUSAGE;
388
389
390/**
[10377]391 * Component factory registration record.
392 */
393typedef struct SUPDRVFACTORYREG
394{
395 /** Pointer to the next registration. */
[14332]396 struct SUPDRVFACTORYREG *pNext;
[10377]397 /** Pointer to the registered factory. */
[14332]398 PCSUPDRVFACTORY pFactory;
[10377]399 /** The session owning the factory.
400 * Used for deregistration and session cleanup. */
[14332]401 PSUPDRVSESSION pSession;
[10377]402 /** Length of the name. */
[14332]403 size_t cchName;
[10377]404} SUPDRVFACTORYREG;
405/** Pointer to a component factory registration record. */
406typedef SUPDRVFACTORYREG *PSUPDRVFACTORYREG;
407/** Pointer to a const component factory registration record. */
408typedef SUPDRVFACTORYREG const *PCSUPDRVFACTORYREG;
409
410
411/**
[1]412 * Registered object.
413 * This takes care of reference counting and tracking data for access checks.
414 */
415typedef struct SUPDRVOBJ
416{
417 /** Magic value (SUPDRVOBJ_MAGIC). */
418 uint32_t u32Magic;
419 /** The object type. */
420 SUPDRVOBJTYPE enmType;
421 /** Pointer to the next in the global list. */
422 struct SUPDRVOBJ * volatile pNext;
[4971]423 /** Pointer to the object destructor.
424 * This may be set to NULL if the image containing the destructor get unloaded. */
[1]425 PFNSUPDRVDESTRUCTOR pfnDestructor;
426 /** User argument 1. */
427 void *pvUser1;
428 /** User argument 2. */
429 void *pvUser2;
430 /** The total sum of all per-session usage. */
431 uint32_t volatile cUsage;
432 /** The creator user id. */
433 RTUID CreatorUid;
434 /** The creator group id. */
435 RTGID CreatorGid;
436 /** The creator process id. */
437 RTPROCESS CreatorProcess;
438} SUPDRVOBJ, *PSUPDRVOBJ;
439
440/** Magic number for SUPDRVOBJ::u32Magic. (Dame Agatha Mary Clarissa Christie). */
[45188]441#define SUPDRVOBJ_MAGIC UINT32_C(0x18900915)
[15841]442/** Dead number magic for SUPDRVOBJ::u32Magic. */
[45188]443#define SUPDRVOBJ_MAGIC_DEAD UINT32_C(0x19760112)
[1]444
445/**
446 * The per-session object usage record.
447 */
448typedef struct SUPDRVUSAGE
449{
450 /** Pointer to the next in the list. */
451 struct SUPDRVUSAGE * volatile pNext;
452 /** Pointer to the object we're recording usage for. */
453 PSUPDRVOBJ pObj;
454 /** The usage count. */
455 uint32_t volatile cUsage;
456} SUPDRVUSAGE, *PSUPDRVUSAGE;
457
458
459/**
460 * Per session data.
461 * This is mainly for memory tracking.
462 */
463typedef struct SUPDRVSESSION
464{
465 /** Pointer to the device extension. */
[14332]466 PSUPDRVDEVEXT pDevExt;
[1]467 /** Session Cookie. */
[14332]468 uint32_t u32Cookie;
[44173]469 /** Set if is an unrestricted session, clear if restricted. */
470 bool fUnrestricted;
[51770]471
472 /** Set if we're in the hash table, clear if not. Protected by the hash
473 * table spinlock. */
474 bool fInHashTable;
475 /** Reference counter. */
[47537]476 uint32_t volatile cRefs;
[51770]477 /** Pointer to the next session with the same hash (common hash table).
478 * Protected by the hash table spinlock. */
479 PSUPDRVSESSION pCommonNextHash;
480 /** Pointer to the OS specific session pointer, if available and in use.
481 * This is atomically set and cleared as the session is inserted and removed
482 * from the hash table (protected by the session hash table spinlock). */
483 PSUPDRVSESSION *ppOsSessionPtr;
484 /** The process (id) of the session. */
485 RTPROCESS Process;
486 /** Which process this session is associated with.
487 * This is NIL_RTR0PROCESS for kernel sessions and valid for user ones. */
488 RTR0PROCESS R0Process;
[1]489
[19866]490 /** The VM associated with the session. */
491 PVM pVM;
492 /** Handle table for IPRT semaphore wrapper APIs.
[45188]493 * This takes care of its own locking in an IRQ safe manner. */
[19866]494 RTHANDLETABLE hHandleTable;
[1]495 /** Load usage records. (protected by SUPDRVDEVEXT::mtxLdr) */
[14332]496 PSUPDRVLDRUSAGE volatile pLdrUsage;
[1]497
[51770]498 /** Spinlock protecting the bundles, the GIP members and the
499 * fProcessCleanupDone flag. It continues to be valid until the last
500 * reference to the session is released. */
[14332]501 RTSPINLOCK Spinlock;
[1]502 /** The ring-3 mapping of the GIP (readonly). */
[14332]503 RTR0MEMOBJ GipMapObjR3;
[1]504 /** Set if the session is using the GIP. */
[14332]505 uint32_t fGipReferenced;
[1]506 /** Bundle of locked memory objects. */
[14332]507 SUPDRVBUNDLE Bundle;
[19866]508 /** List of generic usage records. (protected by SUPDRVDEVEXT::SpinLock) */
509 PSUPDRVUSAGE volatile pUsage;
[1]510
511 /** The user id of the session. (Set by the OS part.) */
[14332]512 RTUID Uid;
[1]513 /** The group id of the session. (Set by the OS part.) */
[14332]514 RTGID Gid;
[40759]515 /** Per session tracer specfic data. */
516 uintptr_t uTracerData;
[40819]517 /** The thread currently actively talking to the tracer. (One at the time!) */
518 RTNATIVETHREAD hTracerCaller;
[41117]519 /** List of tracepoint providers associated with the session
520 * (SUPDRVTPPROVIDER). */
521 RTLISTANCHOR TpProviders;
522 /** The number of providers in TpProviders. */
523 uint32_t cTpProviders;
524 /** The number of threads active in supdrvIOCtl_TracerUmodProbeFire or
525 * SUPR0TracerUmodProbeFire. */
526 uint32_t volatile cTpProbesFiring;
527 /** User tracepoint modules (PSUPDRVTRACKERUMOD). */
528 RTLISTANCHOR TpUmods;
529 /** The user tracepoint module lookup table. */
530 struct SUPDRVTRACERUMOD *apTpLookupTable[32];
[57218]531 /** Whether this is a GIP test-mode client session or not. */
532 bool fGipTestMode;
[23725]533#ifndef SUPDRV_AGNOSTIC
534# if defined(RT_OS_DARWIN)
[10836]535 /** Pointer to the associated org_virtualbox_SupDrvClient object. */
[14332]536 void *pvSupDrvClient;
[10836]537 /** Whether this session has been opened or not. */
[14332]538 bool fOpened;
[23725]539# endif
540# if defined(RT_OS_OS2)
[1193]541 /** The system file number of this session. */
[14332]542 uint16_t sfn;
543 uint16_t Alignment; /**< Alignment */
[23725]544# endif
545# if defined(RT_OS_DARWIN) || defined(RT_OS_OS2) || defined(RT_OS_SOLARIS)
[3189]546 /** Pointer to the next session with the same hash. */
[14332]547 PSUPDRVSESSION pNextHash;
[23725]548# endif
[51770]549# if defined(RT_OS_WINDOWS) && defined(VBOX_WITH_HARDENING)
550 /** Pointer to the process protection structure for this session. */
551 struct SUPDRVNTPROTECT *pNtProtect;
552# endif
[23725]553#endif /* !SUPDRV_AGNOSTIC */
[1]554} SUPDRVSESSION;
555
556
557/**
558 * Device extension.
559 */
560typedef struct SUPDRVDEVEXT
561{
[44188]562 /** Global cookie. */
563 uint32_t u32Cookie;
564 /** The actual size of SUPDRVSESSION. (SUPDRV_AGNOSTIC) */
565 uint32_t cbSession;
566
[45188]567 /** Spinlock to serialize the initialization, usage counting and objects.
568 * This is IRQ safe because we want to be able signal semaphores from the
569 * special HM context (and later maybe interrupt handlers), so we must be able
570 * to reference and dereference handles when IRQs are disabled. */
[14332]571 RTSPINLOCK Spinlock;
[1]572
[4971]573 /** List of registered objects. Protected by the spinlock. */
[14332]574 PSUPDRVOBJ volatile pObjs;
[1]575 /** List of free object usage records. */
[14332]576 PSUPDRVUSAGE volatile pUsageFree;
[1]577
578 /** Loader mutex.
579 * This protects pvVMMR0, pvVMMR0Entry, pImages and SUPDRVSESSION::pLdrUsage. */
[25307]580#ifdef SUPDRV_USE_MUTEX_FOR_LDR
581 RTSEMMUTEX mtxLdr;
582#else
[14332]583 RTSEMFASTMUTEX mtxLdr;
[25307]584#endif
[1]585
586 /** VMM Module 'handle'.
587 * 0 if the code VMM isn't loaded and Idt are nops. */
[14332]588 void * volatile pvVMMR0;
[4811]589 /** VMMR0EntryFast() pointer. */
[19454]590 DECLR0CALLBACKMEMBER(void, pfnVMMR0EntryFast, (PVM pVM, VMCPUID idCpu, unsigned uOperation));
[4811]591 /** VMMR0EntryEx() pointer. */
[19454]592 DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryEx, (PVM pVM, VMCPUID idCpu, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession));
[1]593
594 /** Linked list of loaded code. */
[14332]595 PSUPDRVLDRIMAGE volatile pLdrImages;
[54013]596 /** Set if the image loading interface got disabled after loading all needed images */
597 bool fLdrLockedDown;
[1]598
[40636]599 /** @name These members for detecting whether an API caller is in ModuleInit.
[40756]600 * Certain APIs are only permitted from ModuleInit, like for instance tracepoint
601 * registration.
[40636]602 * @{ */
603 /** The image currently executing its ModuleInit. */
604 PSUPDRVLDRIMAGE volatile pLdrInitImage;
605 /** The thread currently executing a ModuleInit function. */
606 RTNATIVETHREAD volatile hLdrInitThread;
607 /** @} */
608
[57229]609 /** Number of times someone reported bad execution context via SUPR0BadContext.
610 * (This is times EFLAGS.AC is zero when we expected it to be 1.) */
611 uint32_t volatile cBadContextCalls;
[40636]612
[1]613 /** GIP mutex.
614 * Any changes to any of the GIP members requires ownership of this mutex,
615 * except on driver init and termination. */
[25461]616#ifdef SUPDRV_USE_MUTEX_FOR_GIP
617 RTSEMMUTEX mtxGip;
618#else
[14332]619 RTSEMFASTMUTEX mtxGip;
[25461]620#endif
[45188]621 /** GIP spinlock protecting GIP members during Mp events.
622 * This is IRQ safe since be may get MP callbacks in contexts where IRQs are
623 * disabled (on some platforms). */
[40806]624 RTSPINLOCK hGipSpinlock;
[1]625 /** Pointer to the Global Info Page (GIP). */
[14332]626 PSUPGLOBALINFOPAGE pGip;
[1]627 /** The physical address of the GIP. */
[14332]628 RTHCPHYS HCPhysGip;
[1]629 /** Number of processes using the GIP.
630 * (The updates are suspend while cGipUsers is 0.)*/
[14332]631 uint32_t volatile cGipUsers;
[1]632 /** The ring-0 memory object handle for the GIP page. */
[14332]633 RTR0MEMOBJ GipMemObj;
[1]634 /** The GIP timer handle. */
[14332]635 PRTTIMER pGipTimer;
[1]636 /** If non-zero we've successfully called RTTimerRequestSystemGranularity(). */
[14332]637 uint32_t u32SystemTimerGranularityGrant;
[9470]638 /** The CPU id of the GIP master.
[54315]639 * This CPU is responsible for the updating the common GIP data and it is
640 * the one used to calculate TSC deltas relative to.
641 * (The initial master will have a 0 zero value, but it it goes offline the
642 * new master may have a non-zero value.) */
[14332]643 RTCPUID volatile idGipMaster;
[10377]644
[23725]645 /** Component factory mutex.
646 * This protects pComponentFactoryHead and component factory querying. */
647 RTSEMFASTMUTEX mtxComponentFactory;
648 /** The head of the list of registered component factories. */
649 PSUPDRVFACTORYREG pComponentFactoryHead;
650
[40756]651 /** Lock protecting The tracer members. */
652 RTSEMFASTMUTEX mtxTracer;
653 /** List of tracer providers (SUPDRVTPPROVIDER). */
654 RTLISTANCHOR TracerProviderList;
655 /** List of zombie tracer providers (SUPDRVTPPROVIDER). */
656 RTLISTANCHOR TracerProviderZombieList;
657 /** Pointer to the tracer registration record. */
658 PCSUPDRVTRACERREG pTracerOps;
659 /** The ring-0 session of a native tracer provider. */
660 PSUPDRVSESSION pTracerSession;
661 /** The image containing the tracer. */
662 PSUPDRVLDRIMAGE pTracerImage;
663 /** The tracer helpers. */
664 SUPDRVTRACERHLP TracerHlp;
[40819]665 /** The number of session having opened the tracer currently. */
666 uint32_t cTracerOpens;
[41117]667 /** The number of threads currently calling into the tracer. */
668 uint32_t volatile cTracerCallers;
[40756]669 /** Set if the tracer is being unloaded. */
670 bool fTracerUnloading;
[41117]671 /** Hash table for user tracer modules (SUPDRVVTGCOPY). */
672 RTLISTANCHOR aTrackerUmodHash[128];
[40756]673
[51770]674 /** @name Session Handle Table.
675 * @{ */
676 /** Spinlock protecting apSessionHashTab, cSessions,
677 * SUPDRVSESSION::ppOsSessionPtr, SUPDRVSESSION::pCommonNextHash, and possibly
678 * others depending on the OS. */
679 RTSPINLOCK hSessionHashTabSpinlock;
680 /** Session hash table hash table. The size of this table must make sense in
681 * comparison to GVMM_MAX_HANDLES. */
682 PSUPDRVSESSION apSessionHashTab[HC_ARCH_BITS == 64 ? 8191 : 127];
683 /** The number of open sessions. */
684 int32_t cSessions;
685 /** @} */
686
[54352]687 /** @name Invariant TSC frequency refinement.
688 * @{ */
689 /** Nanosecond timestamp at the start of the TSC frequency refinement phase. */
690 uint64_t nsStartInvarTscRefine;
691 /** TSC reading at the start of the TSC frequency refinement phase. */
692 uint64_t uTscStartInvarTscRefine;
693 /** The CPU id of the CPU that u64TscAnchor was measured on. */
694 RTCPUID idCpuInvarTscRefine;
695 /** Pointer to the timer used to refine the TSC frequency. */
696 PRTTIMER pInvarTscRefineTimer;
[54448]697 /** Stop the timer on the next tick because we saw a power event. */
698 bool volatile fInvTscRefinePowerEvent;
[54352]699 /** @} */
700
[53054]701 /** @name TSC-delta measurement.
702 * @{ */
[54448]703 /** Number of online/offline events, incremented each time a CPU goes online
704 * or offline. */
705 uint32_t volatile cMpOnOffEvents;
[54375]706 /** TSC-delta measurement mutext.
707 * At the moment, we don't want to have more than one measurement going on at
708 * any one time. We might be using broadcast IPIs which are heavy and could
709 * perhaps get in each others way. */
710#ifdef SUPDRV_USE_MUTEX_FOR_GIP
711 RTSEMMUTEX mtxTscDelta;
712#else
713 RTSEMFASTMUTEX mtxTscDelta;
714#endif
[54306]715 /** The set of CPUs we need to take measurements for. */
716 RTCPUSET TscDeltaCpuSet;
717 /** The set of CPUs we have completed taken measurements for. */
718 RTCPUSET TscDeltaObtainedCpuSet;
[53464]719 /** @} */
720
721#ifdef SUPDRV_USE_TSC_DELTA_THREAD
722 /** @name TSC-delta measurement thread.
723 * @{ */
[54290]724 /** Spinlock protecting enmTscDeltaThreadState. */
[53054]725 RTSPINLOCK hTscDeltaSpinlock;
726 /** TSC-delta measurement thread. */
727 RTTHREAD hTscDeltaThread;
728 /** The event signalled during state changes to the TSC-delta thread. */
729 RTSEMEVENT hTscDeltaEvent;
730 /** The state of the TSC-delta measurement thread. */
[54290]731 SUPDRVTSCDELTATHREADSTATE enmTscDeltaThreadState;
[53054]732 /** Thread timeout time before rechecking state in ms. */
733 RTMSINTERVAL cMsTscDeltaTimeout;
734 /** Whether the TSC-delta measurement was successful. */
[54262]735 int32_t volatile rcTscDelta;
[54578]736 /** Tell the thread we want TSC-deltas for all CPUs with retries. */
737 bool fTscThreadRecomputeAllDeltas;
[53054]738 /** @} */
739#endif
740
[57218]741 /** @name GIP test mode.
742 * @{ */
743 /** Reference counter for GIP test-mode sessions. */
[57224]744 uint32_t cGipTestModeRefs;
[57218]745 /** Cache of TSC frequency before enabling test-mode on invariant GIP systems. */
746 uint64_t uGipTestModeInvariantCpuHz;
747 /** @} */
748
[40602]749 /*
[51770]750 * Note! The non-agnostic bits must be at the very end of the structure!
[40518]751 */
[23725]752#ifndef SUPDRV_AGNOSTIC
753# ifdef RT_OS_WINDOWS
[40518]754 /** Callback object returned by ExCreateCallback. */
[14332]755 PCALLBACK_OBJECT pObjPowerCallback;
[40518]756 /** Callback handle returned by ExRegisterCallback. */
[14332]757 PVOID hPowerCallback;
[23725]758# endif
[13494]759#endif
[1]760} SUPDRVDEVEXT;
761
[51770]762/** Calculates the index into g_apSessionHashTab.*/
763#define SUPDRV_SESSION_HASH(a_pid) ( (a_pid) % RT_ELEMENTS(((SUPDRVDEVEXT *)NULL)->apSessionHashTab) )
[1]764
[51770]765
[20374]766RT_C_DECLS_BEGIN
[1]767
768/*******************************************************************************
769* OS Specific Functions *
770*******************************************************************************/
[51770]771/**
772 * Called to clean up the session structure before it's freed.
773 *
774 * @param pDevExt The device globals.
775 * @param pSession The session that's being cleaned up.
776 */
777void VBOXCALL supdrvOSCleanupSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
778
779/**
780 * Called to let the OS specfic code perform additional insertion work while
781 * still under the protection of the hash table spinlock.
782 *
783 * @param pDevExt The device globals.
784 * @param pSession The session that was inserted.
785 * @param pvUser User context specified to the insert call.
786 */
787void VBOXCALL supdrvOSSessionHashTabInserted(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, void *pvUser);
788
789/**
790 * Called to let the OS specfic code perform additional removal work while still
791 * under the protection of the hash table spinlock.
792 *
793 * @param pDevExt The device globals.
794 * @param pSession The session that was removed.
795 * @param pvUser User context specified to the remove call.
796 */
797void VBOXCALL supdrvOSSessionHashTabRemoved(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, void *pvUser);
798
[64255]799/**
[64281]800 * Called during GIP initializtion to calc the CPU group table size.
801 *
802 * This is currently only implemented on windows [lazy bird].
803 *
804 * @returns Number of bytes needed for SUPGIPCPUGROUP structures.
805 * @param pDevExt The device globals.
806 */
807size_t VBOXCALL supdrvOSGipGetGroupTableSize(PSUPDRVDEVEXT pDevExt);
808
809/**
[64255]810 * Called during GIP initialization to set up the group table and group count.
811 *
812 * This is currently only implemented on windows [lazy bird].
813 *
814 * @param pDevExt The device globals.
815 * @param pGip The GIP which group table needs initialization.
816 * It's only partially initialized at this point.
[64281]817 * @param cbGipCpuGroups What supdrvOSGipGetGroupTableSize returned.
[64255]818 */
[64281]819int VBOXCALL supdrvOSInitGipGroupTable(PSUPDRVDEVEXT pDevExt, PSUPGLOBALINFOPAGE pGip, size_t cbGipCpuGroups);
[64255]820
821/**
[64281]822 * Initializes the group related members when a CPU is added to the GIP.
[64255]823 *
[64281]824 * This is called both during GIP initalization and during an CPU online event.
825 *
[64255]826 * This is currently only implemented on windows [lazy bird].
827 *
828 * @returns CPU group number.
829 * @param pDevExt The device globals.
[64284]830 * @param pGip The GIP.
831 * @param pGipCpu The GIP CPU structure being initialized.
[64255]832 */
[64281]833void VBOXCALL supdrvOSGipInitGroupBitsForCpu(PSUPDRVDEVEXT pDevExt, PSUPGLOBALINFOPAGE pGip, PSUPGIPCPU pGipCpu);
[64255]834
[1]835void VBOXCALL supdrvOSObjInitCreator(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession);
836bool VBOXCALL supdrvOSObjCanAccess(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession, const char *pszObjName, int *prc);
[8789]837bool VBOXCALL supdrvOSGetForcedAsyncTscMode(PSUPDRVDEVEXT pDevExt);
[54581]838bool VBOXCALL supdrvOSAreCpusOfflinedOnSuspend(void);
[53396]839bool VBOXCALL supdrvOSAreTscDeltasInSync(void);
[14901]840int VBOXCALL supdrvOSEnableVTx(bool fEnabled);
[54650]841RTCCUINTREG VBOXCALL supdrvOSChangeCR4(RTCCUINTREG fOrMask, RTCCUINTREG fAndMask);
[43379]842bool VBOXCALL supdrvOSSuspendVTxOnCpu(void);
843void VBOXCALL supdrvOSResumeVTxOnCpu(bool fSuspended);
[67137]844int VBOXCALL supdrvOSGetCurrentGdtRw(RTHCUINTPTR *pGdtRw);
[1]845
[25258]846/**
847 * Try open the image using the native loader.
848 *
849 * @returns IPRT status code.
850 * @retval VERR_NOT_SUPPORTED if native loading isn't supported.
851 *
852 * @param pDevExt The device globals.
853 * @param pImage The image handle. pvImage should be set on
854 * success, pvImageAlloc can also be set if
855 * appropriate.
[33540]856 * @param pszFilename The file name - UTF-8, may containing UNIX
[25258]857 * slashes on non-UNIX systems.
858 */
859int VBOXCALL supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename);
860
861/**
[41067]862 * Notification call indicating that a image is being opened for the first time.
863 *
[58872]864 * Called for both native and non-native images (after supdrvOSLdrOpen). Can be
865 * used to log the load address of the image or inform the kernel about the
866 * alien image.
[41067]867 *
868 * @param pDevExt The device globals.
869 * @param pImage The image handle.
[58872]870 * @param pszFilename The file name - UTF-8, may containing UNIX
871 * slashes on non-UNIX systems.
[41067]872 */
[58872]873void VBOXCALL supdrvOSLdrNotifyOpened(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename);
[41067]874
875/**
[25258]876 * Validates an entry point address.
877 *
878 * Called before supdrvOSLdrLoad.
879 *
880 * @returns IPRT status code.
881 * @param pDevExt The device globals.
882 * @param pImage The image data (still in the open state).
883 * @param pv The address within the image.
884 * @param pbImageBits The image bits as loaded by ring-3.
885 */
886int VBOXCALL supdrvOSLdrValidatePointer(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage,
887 void *pv, const uint8_t *pbImageBits);
888
889/**
890 * Load the image.
891 *
892 * @returns IPRT status code.
893 * @param pDevExt The device globals.
[37249]894 * @param pImage The image data (up to date). Adjust entrypoints
895 * and exports if necessary.
[25258]896 * @param pbImageBits The image bits as loaded by ring-3.
[37249]897 * @param pReq Pointer to the request packet so that the VMMR0
898 * entry points can be adjusted.
[25258]899 */
[37249]900int VBOXCALL supdrvOSLdrLoad(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const uint8_t *pbImageBits, PSUPLDRLOAD pReq);
[25258]901
902
903/**
[58872]904 * Unload the image (only called if supdrvOSLdrOpen returned success).
[25258]905 *
906 * @param pDevExt The device globals.
907 * @param pImage The image data (mostly still valid).
908 */
909void VBOXCALL supdrvOSLdrUnload(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage);
910
[58872]911/**
912 * Notification call indicating that a image is being unloaded.
913 *
914 * Called for both native and non-native images. In the former case, it's
915 * called after supdrvOSLdrUnload.
916 *
917 * @param pDevExt The device globals.
918 * @param pImage The image handle.
919 */
920void VBOXCALL supdrvOSLdrNotifyUnloaded(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage);
[25258]921
[58872]922
[49634]923#ifdef SUPDRV_WITH_MSR_PROBER
924
925/**
926 * Tries to read an MSR.
927 *
928 * @returns One of the listed VBox status codes.
929 * @retval VINF_SUCCESS if read successfully, value in *puValue.
930 * @retval VERR_ACCESS_DENIED if we couldn't read it (GP).
931 * @retval VERR_NOT_SUPPORTED if not supported.
932 *
933 * @param uMsr The MSR to read from.
934 * @param idCpu The CPU to read the MSR on. NIL_RTCPUID
935 * indicates any suitable CPU.
936 * @param puValue Where to return the value.
937 */
938int VBOXCALL supdrvOSMsrProberRead(uint32_t uMsr, RTCPUID idCpu, uint64_t *puValue);
939
940/**
941 * Tries to write an MSR.
942 *
943 * @returns One of the listed VBox status codes.
944 * @retval VINF_SUCCESS if written successfully.
945 * @retval VERR_ACCESS_DENIED if we couldn't write the value to it (GP).
946 * @retval VERR_NOT_SUPPORTED if not supported.
947 *
948 * @param uMsr The MSR to write to.
949 * @param idCpu The CPU to write the MSR on. NIL_RTCPUID
950 * indicates any suitable CPU.
951 * @param uValue The value to write.
952 */
953int VBOXCALL supdrvOSMsrProberWrite(uint32_t uMsr, RTCPUID idCpu, uint64_t uValue);
954
955/**
956 * Tries to modify an MSR value.
957 *
958 * @returns One of the listed VBox status codes.
959 * @retval VINF_SUCCESS if succeeded.
960 * @retval VERR_NOT_SUPPORTED if not supported.
961 *
962 * @param idCpu The CPU to modify the MSR on. NIL_RTCPUID
963 * indicates any suitable CPU.
964 * @param pReq The request packet with input arguments and
965 * where to store the results.
966 */
967int VBOXCALL supdrvOSMsrProberModify(RTCPUID idCpu, PSUPMSRPROBER pReq);
968
969#endif /* SUPDRV_WITH_MSR_PROBER */
970
[49787]971#if defined(RT_OS_DARWIN)
[49965]972int VBOXCALL supdrvDarwinResumeSuspendedKbds(void);
[49787]973#endif
[49634]974
[1]975/*******************************************************************************
976* Shared Functions *
977*******************************************************************************/
[23725]978/* SUPDrv.c */
[52575]979int VBOXCALL supdrvIOCtl(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPREQHDR pReqHdr, size_t cbReq);
[19454]980int VBOXCALL supdrvIOCtlFast(uintptr_t uIOCtl, VMCPUID idCpu, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
[10263]981int VBOXCALL supdrvIDC(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPDRVIDCREQHDR pReqHdr);
[25484]982int VBOXCALL supdrvInitDevExt(PSUPDRVDEVEXT pDevExt, size_t cbSession);
[4800]983void VBOXCALL supdrvDeleteDevExt(PSUPDRVDEVEXT pDevExt);
[44173]984int VBOXCALL supdrvCreateSession(PSUPDRVDEVEXT pDevExt, bool fUser, bool fUnrestricted, PSUPDRVSESSION *ppSession);
[51770]985int VBOXCALL supdrvSessionHashTabInsert(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPDRVSESSION *ppOsSessionPtr, void *pvUser);
986int VBOXCALL supdrvSessionHashTabRemove(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, void *pvUser);
987PSUPDRVSESSION VBOXCALL supdrvSessionHashTabLookup(PSUPDRVDEVEXT pDevExt, RTPROCESS Process, RTR0PROCESS R0Process,
988 PSUPDRVSESSION *ppOsSessionPtr);
[47537]989uint32_t VBOXCALL supdrvSessionRetain(PSUPDRVSESSION pSession);
990uint32_t VBOXCALL supdrvSessionRelease(PSUPDRVSESSION pSession);
[57229]991void VBOXCALL supdrvBadContext(PSUPDRVDEVEXT pDevExt, const char *pszFile, uint32_t uLine, const char *pszExtra);
[56558]992int VBOXCALL supdrvQueryVTCapsInternal(uint32_t *pfCaps);
[57378]993int VBOXCALL supdrvLdrLoadError(int rc, PSUPLDRLOAD pReq, const char *pszFormat, ...);
[1]994
[54327]995/* SUPDrvGip.cpp */
996int VBOXCALL supdrvGipCreate(PSUPDRVDEVEXT pDevExt);
997void VBOXCALL supdrvGipDestroy(PSUPDRVDEVEXT pDevExt);
998int VBOXCALL supdrvIOCtl_TscDeltaMeasure(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPTSCDELTAMEASURE pReq);
999int VBOXCALL supdrvIOCtl_TscRead(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPTSCREAD pReq);
[57218]1000int VBOXCALL supdrvIOCtl_GipSetFlags(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, uint32_t fOrMask, uint32_t fAndMask);
[54327]1001
[57218]1002
[54327]1003/* SUPDrvTracer.cpp */
[40756]1004int VBOXCALL supdrvTracerInit(PSUPDRVDEVEXT pDevExt);
1005void VBOXCALL supdrvTracerTerm(PSUPDRVDEVEXT pDevExt);
1006void VBOXCALL supdrvTracerModuleUnloading(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage);
1007void VBOXCALL supdrvTracerCleanupSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
[41117]1008int VBOXCALL supdrvIOCtl_TracerUmodRegister(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession,
1009 RTR3PTR R3PtrVtgHdr, RTUINTPTR uVtgHdrAddr,
1010 RTR3PTR R3PtrStrTab, uint32_t cbStrTab,
1011 const char *pszModName, uint32_t fFlags);
1012int VBOXCALL supdrvIOCtl_TracerUmodDeregister(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, RTR3PTR R3PtrVtgHdr);
1013void VBOXCALL supdrvIOCtl_TracerUmodProbeFire(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPDRVTRACERUSRCTX pCtx);
[40819]1014int VBOXCALL supdrvIOCtl_TracerOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, uint32_t uCookie, uintptr_t uArg);
1015int VBOXCALL supdrvIOCtl_TracerClose(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
1016int VBOXCALL supdrvIOCtl_TracerIOCtl(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, uintptr_t uCmd, uintptr_t uArg, int32_t *piRetVal);
[40777]1017extern PFNRT g_pfnSupdrvProbeFireKernel;
1018DECLASM(void) supdrvTracerProbeFireStub(void);
[40611]1019
[40975]1020#ifdef VBOX_WITH_NATIVE_DTRACE
[40851]1021const SUPDRVTRACERREG * VBOXCALL supdrvDTraceInit(void);
1022#endif
[40756]1023
[20374]1024RT_C_DECLS_END
[1]1025
1026#endif
1027
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use