VirtualBox

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

Last change on this file since 40611 was 40611, checked in by vboxsync, 13 years ago

Init the dtrace bits...

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 22.4 KB
Line 
1/* $Revision: 40611 $ */
2/** @file
3 * VirtualBox Support Driver - Internal header.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Oracle Corporation
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
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.
25 */
26
27#ifndef ___SUPDrvInternal_h
28#define ___SUPDrvInternal_h
29
30
31/*******************************************************************************
32* Header Files *
33*******************************************************************************/
34#include <VBox/cdefs.h>
35#include <VBox/types.h>
36#include <VBox/sup.h>
37
38#include <iprt/assert.h>
39#include <iprt/list.h>
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>
45
46#ifdef SUPDRV_AGNOSTIC
47/* do nothing */
48
49#elif defined(RT_OS_WINDOWS)
50 RT_C_DECLS_BEGIN
51# if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
52# define _InterlockedExchange _InterlockedExchange_StupidDDKVsCompilerCrap
53# define _InterlockedExchangeAdd _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
54# define _InterlockedCompareExchange _InterlockedCompareExchange_StupidDDKVsCompilerCrap
55# define _InterlockedAddLargeStatistic _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
56# define _interlockedbittestandset _interlockedbittestandset_StupidDDKVsCompilerCrap
57# define _interlockedbittestandreset _interlockedbittestandreset_StupidDDKVsCompilerCrap
58# define _interlockedbittestandset64 _interlockedbittestandset64_StupidDDKVsCompilerCrap
59# define _interlockedbittestandreset64 _interlockedbittestandreset64_StupidDDKVsCompilerCrap
60# pragma warning(disable : 4163)
61# include <ntddk.h>
62# pragma warning(default : 4163)
63# undef _InterlockedExchange
64# undef _InterlockedExchangeAdd
65# undef _InterlockedCompareExchange
66# undef _InterlockedAddLargeStatistic
67# undef _interlockedbittestandset
68# undef _interlockedbittestandreset
69# undef _interlockedbittestandset64
70# undef _interlockedbittestandreset64
71# else
72# include <ntddk.h>
73# endif
74# include <memory.h>
75# define memcmp(a,b,c) mymemcmp(a,b,c)
76 int VBOXCALL mymemcmp(const void *, const void *, size_t);
77 RT_C_DECLS_END
78
79#elif defined(RT_OS_LINUX)
80# include <linux/version.h>
81# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
82# include <generated/autoconf.h>
83# else
84# ifndef AUTOCONF_INCLUDED
85# include <linux/autoconf.h>
86# endif
87# endif
88# if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
89# define MODVERSIONS
90# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 71)
91# include <linux/modversions.h>
92# endif
93# endif
94# if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 0)
95# undef ALIGN
96# endif
97# ifndef KBUILD_STR
98# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
99# define KBUILD_STR(s) s
100# else
101# define KBUILD_STR(s) #s
102# endif
103# endif
104# include <linux/string.h>
105# include <linux/spinlock.h>
106# include <linux/slab.h>
107# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
108# include <linux/semaphore.h>
109# else /* older kernels */
110# include <asm/semaphore.h>
111# endif /* older kernels */
112# include <linux/timer.h>
113
114#elif defined(RT_OS_DARWIN)
115# include <libkern/libkern.h>
116# include <iprt/string.h>
117
118#elif defined(RT_OS_OS2)
119
120#elif defined(RT_OS_FREEBSD)
121# define memset libkern_memset /** @todo these are just hacks to get it compiling, check out later. */
122# define memcmp libkern_memcmp
123# define strchr libkern_strchr
124# define strrchr libkern_strrchr
125# define ffsl libkern_ffsl
126# define fls libkern_fls
127# define flsl libkern_flsl
128# include <sys/libkern.h>
129# undef memset
130# undef memcmp
131# undef strchr
132# undef strrchr
133# undef ffs
134# undef ffsl
135# undef fls
136# undef flsl
137# include <iprt/string.h>
138
139#elif defined(RT_OS_SOLARIS)
140# include <sys/cmn_err.h>
141# include <iprt/string.h>
142
143#else
144# error "unsupported OS."
145#endif
146
147#include "SUPDrvIOC.h"
148#include "SUPDrvIDC.h"
149
150
151
152/*******************************************************************************
153* Defined Constants And Macros *
154*******************************************************************************/
155/*
156 * Hardcoded cookies.
157 */
158#define BIRD 0x64726962 /* 'bird' */
159#define BIRD_INV 0x62697264 /* 'drib' */
160
161
162#ifdef RT_OS_WINDOWS
163/** Use a normal mutex for the loader so we remain at the same IRQL after
164 * taking it.
165 * @todo fix the mutex implementation on linux and make this the default. */
166# define SUPDRV_USE_MUTEX_FOR_LDR
167
168/** Use a normal mutex for the GIP so we remain at the same IRQL after
169 * taking it.
170 * @todo fix the mutex implementation on linux and make this the default. */
171# define SUPDRV_USE_MUTEX_FOR_GIP
172#endif
173
174
175/**
176 * OS debug print macro.
177 */
178#define OSDBGPRINT(a) SUPR0Printf a
179
180
181/** @name Context values for the per-session handle tables.
182 * The context value is used to distinguish between the different kinds of
183 * handles, making the handle table API do all the work.
184 * @{ */
185/** Handle context value for single release event handles. */
186#define SUPDRV_HANDLE_CTX_EVENT ((void *)(uintptr_t)(SUPDRVOBJTYPE_SEM_EVENT))
187/** Handle context value for multiple release event handles. */
188#define SUPDRV_HANDLE_CTX_EVENT_MULTI ((void *)(uintptr_t)(SUPDRVOBJTYPE_SEM_EVENT_MULTI))
189/** @} */
190
191
192/**
193 * Validates a session pointer.
194 *
195 * @returns true/false accordingly.
196 * @param pSession The session.
197 */
198#define SUP_IS_SESSION_VALID(pSession) \
199 ( VALID_PTR(pSession) \
200 && pSession->u32Cookie == BIRD_INV)
201
202
203/*******************************************************************************
204* Structures and Typedefs *
205*******************************************************************************/
206/** Pointer to the device extension. */
207typedef struct SUPDRVDEVEXT *PSUPDRVDEVEXT;
208
209
210/**
211 * Memory reference types.
212 */
213typedef enum
214{
215 /** Unused entry */
216 MEMREF_TYPE_UNUSED = 0,
217 /** Locked memory (r3 mapping only). */
218 MEMREF_TYPE_LOCKED,
219 /** Continuous memory block (r3 and r0 mapping). */
220 MEMREF_TYPE_CONT,
221 /** Low memory block (r3 and r0 mapping). */
222 MEMREF_TYPE_LOW,
223 /** Memory block (r3 and r0 mapping). */
224 MEMREF_TYPE_MEM,
225 /** Locked memory (r3 mapping only) allocated by the support driver. */
226 MEMREF_TYPE_PAGE,
227 /** Blow the type up to 32-bit and mark the end. */
228 MEMREF_TYPE_32BIT_HACK = 0x7fffffff
229} SUPDRVMEMREFTYPE, *PSUPDRVMEMREFTYPE;
230
231
232/**
233 * Structure used for tracking memory a session
234 * references in one way or another.
235 */
236typedef struct SUPDRVMEMREF
237{
238 /** The memory object handle. */
239 RTR0MEMOBJ MemObj;
240 /** The ring-3 mapping memory object handle. */
241 RTR0MEMOBJ MapObjR3;
242 /** Type of memory. */
243 SUPDRVMEMREFTYPE eType;
244} SUPDRVMEMREF, *PSUPDRVMEMREF;
245
246
247/**
248 * Bundle of locked memory ranges.
249 */
250typedef struct SUPDRVBUNDLE
251{
252 /** Pointer to the next bundle. */
253 struct SUPDRVBUNDLE * volatile pNext;
254 /** Referenced memory. */
255 SUPDRVMEMREF aMem[64];
256 /** Number of entries used. */
257 uint32_t volatile cUsed;
258} SUPDRVBUNDLE, *PSUPDRVBUNDLE;
259
260
261/**
262 * Loaded image.
263 */
264typedef struct SUPDRVLDRIMAGE
265{
266 /** Next in chain. */
267 struct SUPDRVLDRIMAGE * volatile pNext;
268 /** Pointer to the image. */
269 void *pvImage;
270 /** Pointer to the allocated image buffer.
271 * pvImage is 32-byte aligned or it may governed by the native loader (this
272 * member is NULL then). */
273 void *pvImageAlloc;
274 /** Size of the image including the tables. This is mainly for verification
275 * of the load request. */
276 uint32_t cbImageWithTabs;
277 /** Size of the image. */
278 uint32_t cbImageBits;
279 /** The number of entries in the symbol table. */
280 uint32_t cSymbols;
281 /** Pointer to the symbol table. */
282 PSUPLDRSYM paSymbols;
283 /** The offset of the string table. */
284 char *pachStrTab;
285 /** Size of the string table. */
286 uint32_t cbStrTab;
287 /** Pointer to the optional module initialization callback. */
288 PFNR0MODULEINIT pfnModuleInit;
289 /** Pointer to the optional module termination callback. */
290 PFNR0MODULETERM pfnModuleTerm;
291 /** Service request handler. This is NULL for non-service modules. */
292 PFNSUPR0SERVICEREQHANDLER pfnServiceReqHandler;
293 /** The ldr image state. (IOCtl code of last operation.) */
294 uint32_t uState;
295 /** Usage count. */
296 uint32_t volatile cUsage;
297#ifdef RT_OS_WINDOWS
298 /** The section object for the loaded image (fNative=true). */
299 void *pvNtSectionObj;
300 /** Lock object. */
301 RTR0MEMOBJ hMemLock;
302#endif
303#if defined(RT_OS_SOLARIS) && defined(VBOX_WITH_NATIVE_SOLARIS_LOADING)
304 /** The Solaris module ID. */
305 int idSolMod;
306 /** Pointer to the module control structure. */
307 struct modctl *pSolModCtl;
308#endif
309 /** Whether it's loaded by the native loader or not. */
310 bool fNative;
311 /** Image name. */
312 char szName[32];
313} SUPDRVLDRIMAGE, *PSUPDRVLDRIMAGE;
314
315
316/** Image usage record. */
317typedef struct SUPDRVLDRUSAGE
318{
319 /** Next in chain. */
320 struct SUPDRVLDRUSAGE * volatile pNext;
321 /** The image. */
322 PSUPDRVLDRIMAGE pImage;
323 /** Load count. */
324 uint32_t volatile cUsage;
325} SUPDRVLDRUSAGE, *PSUPDRVLDRUSAGE;
326
327
328/**
329 * Component factory registration record.
330 */
331typedef struct SUPDRVFACTORYREG
332{
333 /** Pointer to the next registration. */
334 struct SUPDRVFACTORYREG *pNext;
335 /** Pointer to the registered factory. */
336 PCSUPDRVFACTORY pFactory;
337 /** The session owning the factory.
338 * Used for deregistration and session cleanup. */
339 PSUPDRVSESSION pSession;
340 /** Length of the name. */
341 size_t cchName;
342} SUPDRVFACTORYREG;
343/** Pointer to a component factory registration record. */
344typedef SUPDRVFACTORYREG *PSUPDRVFACTORYREG;
345/** Pointer to a const component factory registration record. */
346typedef SUPDRVFACTORYREG const *PCSUPDRVFACTORYREG;
347
348
349/**
350 * Registered object.
351 * This takes care of reference counting and tracking data for access checks.
352 */
353typedef struct SUPDRVOBJ
354{
355 /** Magic value (SUPDRVOBJ_MAGIC). */
356 uint32_t u32Magic;
357 /** The object type. */
358 SUPDRVOBJTYPE enmType;
359 /** Pointer to the next in the global list. */
360 struct SUPDRVOBJ * volatile pNext;
361 /** Pointer to the object destructor.
362 * This may be set to NULL if the image containing the destructor get unloaded. */
363 PFNSUPDRVDESTRUCTOR pfnDestructor;
364 /** User argument 1. */
365 void *pvUser1;
366 /** User argument 2. */
367 void *pvUser2;
368 /** The total sum of all per-session usage. */
369 uint32_t volatile cUsage;
370 /** The creator user id. */
371 RTUID CreatorUid;
372 /** The creator group id. */
373 RTGID CreatorGid;
374 /** The creator process id. */
375 RTPROCESS CreatorProcess;
376} SUPDRVOBJ, *PSUPDRVOBJ;
377
378/** Magic number for SUPDRVOBJ::u32Magic. (Dame Agatha Mary Clarissa Christie). */
379#define SUPDRVOBJ_MAGIC 0x18900915
380/** Dead number magic for SUPDRVOBJ::u32Magic. */
381#define SUPDRVOBJ_MAGIC_DEAD 0x19760112
382
383/**
384 * The per-session object usage record.
385 */
386typedef struct SUPDRVUSAGE
387{
388 /** Pointer to the next in the list. */
389 struct SUPDRVUSAGE * volatile pNext;
390 /** Pointer to the object we're recording usage for. */
391 PSUPDRVOBJ pObj;
392 /** The usage count. */
393 uint32_t volatile cUsage;
394} SUPDRVUSAGE, *PSUPDRVUSAGE;
395
396
397/**
398 * Per session data.
399 * This is mainly for memory tracking.
400 */
401typedef struct SUPDRVSESSION
402{
403 /** Pointer to the device extension. */
404 PSUPDRVDEVEXT pDevExt;
405 /** Session Cookie. */
406 uint32_t u32Cookie;
407
408 /** The VM associated with the session. */
409 PVM pVM;
410 /** Handle table for IPRT semaphore wrapper APIs.
411 * Programmable from R0 and R3. */
412 RTHANDLETABLE hHandleTable;
413 /** Load usage records. (protected by SUPDRVDEVEXT::mtxLdr) */
414 PSUPDRVLDRUSAGE volatile pLdrUsage;
415
416 /** Spinlock protecting the bundles and the GIP members. */
417 RTSPINLOCK Spinlock;
418 /** The ring-3 mapping of the GIP (readonly). */
419 RTR0MEMOBJ GipMapObjR3;
420 /** Set if the session is using the GIP. */
421 uint32_t fGipReferenced;
422 /** Bundle of locked memory objects. */
423 SUPDRVBUNDLE Bundle;
424 /** List of generic usage records. (protected by SUPDRVDEVEXT::SpinLock) */
425 PSUPDRVUSAGE volatile pUsage;
426
427 /** The user id of the session. (Set by the OS part.) */
428 RTUID Uid;
429 /** The group id of the session. (Set by the OS part.) */
430 RTGID Gid;
431 /** The process (id) of the session. */
432 RTPROCESS Process;
433 /** Which process this session is associated with.
434 * This is NIL_RTR0PROCESS for kernel sessions and valid for user ones. */
435 RTR0PROCESS R0Process;
436#ifndef SUPDRV_AGNOSTIC
437# if defined(RT_OS_DARWIN)
438 /** Pointer to the associated org_virtualbox_SupDrvClient object. */
439 void *pvSupDrvClient;
440 /** Whether this session has been opened or not. */
441 bool fOpened;
442# endif
443# if defined(RT_OS_OS2)
444 /** The system file number of this session. */
445 uint16_t sfn;
446 uint16_t Alignment; /**< Alignment */
447# endif
448# if defined(RT_OS_DARWIN) || defined(RT_OS_OS2) || defined(RT_OS_SOLARIS)
449 /** Pointer to the next session with the same hash. */
450 PSUPDRVSESSION pNextHash;
451# endif
452#endif /* !SUPDRV_AGNOSTIC */
453} SUPDRVSESSION;
454
455
456/**
457 * Device extension.
458 */
459typedef struct SUPDRVDEVEXT
460{
461 /** Spinlock to serialize the initialization, usage counting and objects. */
462 RTSPINLOCK Spinlock;
463
464 /** List of registered objects. Protected by the spinlock. */
465 PSUPDRVOBJ volatile pObjs;
466 /** List of free object usage records. */
467 PSUPDRVUSAGE volatile pUsageFree;
468
469 /** Global cookie. */
470 uint32_t u32Cookie;
471 /** The actual size of SUPDRVSESSION. (SUPDRV_AGNOSTIC) */
472 uint32_t cbSession;
473
474 /** Loader mutex.
475 * This protects pvVMMR0, pvVMMR0Entry, pImages and SUPDRVSESSION::pLdrUsage. */
476#ifdef SUPDRV_USE_MUTEX_FOR_LDR
477 RTSEMMUTEX mtxLdr;
478#else
479 RTSEMFASTMUTEX mtxLdr;
480#endif
481
482 /** VMM Module 'handle'.
483 * 0 if the code VMM isn't loaded and Idt are nops. */
484 void * volatile pvVMMR0;
485 /** VMMR0EntryInt() pointer. */
486 DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryInt, (PVM pVM, unsigned uOperation, void *pvArg));
487 /** VMMR0EntryFast() pointer. */
488 DECLR0CALLBACKMEMBER(void, pfnVMMR0EntryFast, (PVM pVM, VMCPUID idCpu, unsigned uOperation));
489 /** VMMR0EntryEx() pointer. */
490 DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryEx, (PVM pVM, VMCPUID idCpu, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession));
491
492 /** Linked list of loaded code. */
493 PSUPDRVLDRIMAGE volatile pLdrImages;
494
495 /** GIP mutex.
496 * Any changes to any of the GIP members requires ownership of this mutex,
497 * except on driver init and termination. */
498#ifdef SUPDRV_USE_MUTEX_FOR_GIP
499 RTSEMMUTEX mtxGip;
500#else
501 RTSEMFASTMUTEX mtxGip;
502#endif
503 /** Pointer to the Global Info Page (GIP). */
504 PSUPGLOBALINFOPAGE pGip;
505 /** The physical address of the GIP. */
506 RTHCPHYS HCPhysGip;
507 /** Number of processes using the GIP.
508 * (The updates are suspend while cGipUsers is 0.)*/
509 uint32_t volatile cGipUsers;
510 /** The ring-0 memory object handle for the GIP page. */
511 RTR0MEMOBJ GipMemObj;
512 /** The GIP timer handle. */
513 PRTTIMER pGipTimer;
514 /** If non-zero we've successfully called RTTimerRequestSystemGranularity(). */
515 uint32_t u32SystemTimerGranularityGrant;
516 /** The CPU id of the GIP master.
517 * This CPU is responsible for the updating the common GIP data. */
518 RTCPUID volatile idGipMaster;
519
520 /** Component factory mutex.
521 * This protects pComponentFactoryHead and component factory querying. */
522 RTSEMFASTMUTEX mtxComponentFactory;
523 /** The head of the list of registered component factories. */
524 PSUPDRVFACTORYREG pComponentFactoryHead;
525
526#ifdef VBOX_WITH_DTRACE_R0DRV
527 /** Lock protecting DtProviderList. */
528 RTSEMFASTMUTEX mtxDTrace;
529 /** List of DTrace providers (SUPDRVDTPROVIDER). */
530 RTLISTANCHOR DtProviderList;
531#endif
532
533 /*
534 * Note! The non-agnostic bits must be a the very end of the structure!
535 */
536#ifndef SUPDRV_AGNOSTIC
537# ifdef RT_OS_WINDOWS
538 /** Callback object returned by ExCreateCallback. */
539 PCALLBACK_OBJECT pObjPowerCallback;
540 /** Callback handle returned by ExRegisterCallback. */
541 PVOID hPowerCallback;
542# endif
543#endif
544} SUPDRVDEVEXT;
545
546
547RT_C_DECLS_BEGIN
548
549/*******************************************************************************
550* OS Specific Functions *
551*******************************************************************************/
552void VBOXCALL supdrvOSObjInitCreator(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession);
553bool VBOXCALL supdrvOSObjCanAccess(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession, const char *pszObjName, int *prc);
554bool VBOXCALL supdrvOSGetForcedAsyncTscMode(PSUPDRVDEVEXT pDevExt);
555int VBOXCALL supdrvOSEnableVTx(bool fEnabled);
556
557/**
558 * Try open the image using the native loader.
559 *
560 * @returns IPRT status code.
561 * @retval VERR_NOT_SUPPORTED if native loading isn't supported.
562 *
563 * @param pDevExt The device globals.
564 * @param pImage The image handle. pvImage should be set on
565 * success, pvImageAlloc can also be set if
566 * appropriate.
567 * @param pszFilename The file name - UTF-8, may containing UNIX
568 * slashes on non-UNIX systems.
569 */
570int VBOXCALL supdrvOSLdrOpen(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const char *pszFilename);
571
572/**
573 * Validates an entry point address.
574 *
575 * Called before supdrvOSLdrLoad.
576 *
577 * @returns IPRT status code.
578 * @param pDevExt The device globals.
579 * @param pImage The image data (still in the open state).
580 * @param pv The address within the image.
581 * @param pbImageBits The image bits as loaded by ring-3.
582 */
583int VBOXCALL supdrvOSLdrValidatePointer(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage,
584 void *pv, const uint8_t *pbImageBits);
585
586/**
587 * Load the image.
588 *
589 * @returns IPRT status code.
590 * @param pDevExt The device globals.
591 * @param pImage The image data (up to date). Adjust entrypoints
592 * and exports if necessary.
593 * @param pbImageBits The image bits as loaded by ring-3.
594 * @param pReq Pointer to the request packet so that the VMMR0
595 * entry points can be adjusted.
596 */
597int VBOXCALL supdrvOSLdrLoad(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const uint8_t *pbImageBits, PSUPLDRLOAD pReq);
598
599
600/**
601 * Unload the image.
602 *
603 * @param pDevExt The device globals.
604 * @param pImage The image data (mostly still valid).
605 */
606void VBOXCALL supdrvOSLdrUnload(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage);
607
608
609/*******************************************************************************
610* Shared Functions *
611*******************************************************************************/
612/* SUPDrv.c */
613int VBOXCALL supdrvIOCtl(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPREQHDR pReqHdr);
614int VBOXCALL supdrvIOCtlFast(uintptr_t uIOCtl, VMCPUID idCpu, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
615int VBOXCALL supdrvIDC(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPDRVIDCREQHDR pReqHdr);
616int VBOXCALL supdrvInitDevExt(PSUPDRVDEVEXT pDevExt, size_t cbSession);
617void VBOXCALL supdrvDeleteDevExt(PSUPDRVDEVEXT pDevExt);
618int VBOXCALL supdrvCreateSession(PSUPDRVDEVEXT pDevExt, bool fUser, PSUPDRVSESSION *ppSession);
619void VBOXCALL supdrvCloseSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
620void VBOXCALL supdrvCleanupSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
621
622#ifdef VBOX_WITH_DTRACE_R0DRV
623int VBOXCALL supdrvDTraceTerm(PSUPDRVDEVEXT pDevExt);
624int VBOXCALL supdrvDTraceInit(PSUPDRVDEVEXT pDevExt);
625#endif
626
627
628
629RT_C_DECLS_END
630
631#endif
632
Note: See TracBrowser for help on using the repository browser.

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