VirtualBox

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

Last change on this file since 22169 was 20954, checked in by vboxsync, 15 years ago

SUPDrvInternal.h: comment cleanup.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 21.7 KB
Line 
1/* $Revision: 20954 $ */
2/** @file
3 * VirtualBox Support Driver - Internal header.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
27 * Clara, CA 95054 USA or visit http://www.sun.com if you need
28 * additional information or have any questions.
29 */
30
31#ifndef ___SUPDrvInternal_h
32#define ___SUPDrvInternal_h
33
34
35/*******************************************************************************
36* Header Files *
37*******************************************************************************/
38#include <VBox/cdefs.h>
39#include <VBox/types.h>
40#include <iprt/assert.h>
41#include <iprt/asm.h>
42#include <VBox/sup.h>
43#include <iprt/memobj.h>
44#include <iprt/time.h>
45#include <iprt/timer.h>
46#include <iprt/string.h>
47#include <iprt/err.h>
48
49
50#if defined(RT_OS_WINDOWS)
51 RT_C_DECLS_BEGIN
52# if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
53# define _InterlockedExchange _InterlockedExchange_StupidDDKVsCompilerCrap
54# define _InterlockedExchangeAdd _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
55# define _InterlockedCompareExchange _InterlockedCompareExchange_StupidDDKVsCompilerCrap
56# define _InterlockedAddLargeStatistic _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
57# define _interlockedbittestandset _interlockedbittestandset_StupidDDKVsCompilerCrap
58# define _interlockedbittestandreset _interlockedbittestandreset_StupidDDKVsCompilerCrap
59# define _interlockedbittestandset64 _interlockedbittestandset64_StupidDDKVsCompilerCrap
60# define _interlockedbittestandreset64 _interlockedbittestandreset64_StupidDDKVsCompilerCrap
61# pragma warning(disable : 4163)
62# include <ntddk.h>
63# pragma warning(default : 4163)
64# undef _InterlockedExchange
65# undef _InterlockedExchangeAdd
66# undef _InterlockedCompareExchange
67# undef _InterlockedAddLargeStatistic
68# undef _interlockedbittestandset
69# undef _interlockedbittestandreset
70# undef _interlockedbittestandset64
71# undef _interlockedbittestandreset64
72# else
73# include <ntddk.h>
74# endif
75# include <memory.h>
76# define memcmp(a,b,c) mymemcmp(a,b,c)
77 int VBOXCALL mymemcmp(const void *, const void *, size_t);
78 RT_C_DECLS_END
79
80#elif defined(RT_OS_LINUX)
81# include <linux/autoconf.h>
82# include <linux/version.h>
83# if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
84# define MODVERSIONS
85# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 71)
86# include <linux/modversions.h>
87# endif
88# endif
89# if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 0)
90# undef ALIGN
91# endif
92# ifndef KBUILD_STR
93# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
94# define KBUILD_STR(s) s
95# else
96# define KBUILD_STR(s) #s
97# endif
98# endif
99# include <linux/string.h>
100# include <linux/spinlock.h>
101# include <linux/slab.h>
102# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
103# include <linux/semaphore.h>
104# else /* older kernels */
105# include <asm/semaphore.h>
106# endif /* older kernels */
107# include <linux/timer.h>
108
109# if 0
110# include <linux/hrtimer.h>
111# define VBOX_HRTIMER
112# endif
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 ffs libkern_ffs
126# define ffsl libkern_ffsl
127# define fls libkern_fls
128# define flsl libkern_flsl
129# include <sys/libkern.h>
130# undef memset
131# undef memcmp
132# undef strchr
133# undef strrchr
134# undef ffs
135# undef ffsl
136# undef fls
137# undef flsl
138# include <iprt/string.h>
139
140#elif defined(RT_OS_SOLARIS)
141# include <sys/cmn_err.h>
142# include <iprt/string.h>
143
144#else
145# error "unsupported OS."
146#endif
147
148#include "SUPDrvIOC.h"
149#include "SUPDrvIDC.h"
150
151
152
153/*******************************************************************************
154* Defined Constants And Macros *
155*******************************************************************************/
156/*
157 * Hardcoded cookies.
158 */
159#define BIRD 0x64726962 /* 'bird' */
160#define BIRD_INV 0x62697264 /* 'drib' */
161
162
163/*
164 * Win32
165 */
166#if defined(RT_OS_WINDOWS)
167
168/* debug printf */
169# define OSDBGPRINT(a) DbgPrint a
170
171/** Maximum number of bytes we try to lock down in one go.
172 * This is supposed to have a limit right below 256MB, but this appears
173 * to actually be much lower. The values here have been determined experimentally.
174 */
175#ifdef RT_ARCH_X86
176# define MAX_LOCK_MEM_SIZE (32*1024*1024) /* 32mb */
177#endif
178#ifdef RT_ARCH_AMD64
179# define MAX_LOCK_MEM_SIZE (24*1024*1024) /* 24mb */
180#endif
181
182
183/*
184 * Linux
185 */
186#elif defined(RT_OS_LINUX)
187
188/* check kernel version */
189#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
190# error Unsupported kernel version!
191#endif
192
193RT_C_DECLS_BEGIN
194int linux_dprintf(const char *format, ...);
195RT_C_DECLS_END
196
197/* debug printf */
198# define OSDBGPRINT(a) printk a
199
200
201/*
202 * Darwin
203 */
204#elif defined(RT_OS_DARWIN)
205
206/* debug printf */
207# define OSDBGPRINT(a) printf a
208
209
210/*
211 * OS/2
212 */
213#elif defined(RT_OS_OS2)
214
215/* No log API in OS/2 only COM port. */
216# define OSDBGPRINT(a) SUPR0Printf a
217
218
219/*
220 * FreeBSD
221 */
222#elif defined(RT_OS_FREEBSD)
223
224/* debug printf */
225# define OSDBGPRINT(a) printf a
226
227
228/*
229 * Solaris
230 */
231#elif defined(RT_OS_SOLARIS)
232# define OSDBGPRINT(a) SUPR0Printf a
233
234
235#else
236/** @todo other os'es */
237# error "OS interface defines is not done for this OS!"
238#endif
239
240
241/* dprintf */
242#if (defined(DEBUG) && !defined(NO_LOGGING))
243# ifdef LOG_TO_COM
244# include <VBox/log.h>
245# define dprintf(a) RTLogComPrintf a
246# else
247# define dprintf(a) OSDBGPRINT(a)
248# endif
249#else
250# define dprintf(a) do {} while (0)
251#endif
252
253/* dprintf2 - extended logging. */
254#if defined(RT_OS_DARWIN) || defined(RT_OS_OS2) || defined(RT_OS_FREEBSD)
255# define dprintf2 dprintf
256#else
257# define dprintf2(a) do { } while (0)
258#endif
259
260
261/** @def RT_WITH_W64_UNWIND_HACK
262 * Changes a function name into the wrapped version if we've
263 * enabled the unwind hack.
264 *
265 * The unwind hack is for making the NT unwind procedures skip
266 * our dynamically loaded code when they try to walk the call
267 * stack. Needless to say, they kind of don't expect what
268 * we're doing here and get kind of confused and may BSOD. */
269#ifdef DOXYGEN_RUNNING
270# define RT_WITH_W64_UNWIND_HACK
271#endif
272/** @def UNWIND_WRAP
273 * If RT_WITH_W64_UNWIND_HACK is defined, the name will be prefixed with
274 * 'supdrvNtWrap'.
275 * @param Name The function to wrapper. */
276#ifdef RT_WITH_W64_UNWIND_HACK
277# define UNWIND_WRAP(Name) supdrvNtWrap##Name
278#else
279# define UNWIND_WRAP(Name) Name
280#endif
281
282
283/*
284 * Error codes.
285 */
286/** @todo retire the SUPDRV_ERR_* stuff, we ship err.h now. */
287/** Invalid parameter. */
288#define SUPDRV_ERR_GENERAL_FAILURE (-1)
289/** Invalid parameter. */
290#define SUPDRV_ERR_INVALID_PARAM (-2)
291/** Invalid magic or cookie. */
292#define SUPDRV_ERR_INVALID_MAGIC (-3)
293/** Invalid loader handle. */
294#define SUPDRV_ERR_INVALID_HANDLE (-4)
295/** Failed to lock the address range. */
296#define SUPDRV_ERR_LOCK_FAILED (-5)
297/** Invalid memory pointer. */
298#define SUPDRV_ERR_INVALID_POINTER (-6)
299/** Failed to patch the IDT. */
300#define SUPDRV_ERR_IDT_FAILED (-7)
301/** Memory allocation failed. */
302#define SUPDRV_ERR_NO_MEMORY (-8)
303/** Already loaded. */
304#define SUPDRV_ERR_ALREADY_LOADED (-9)
305/** Permission denied. */
306#define SUPDRV_ERR_PERMISSION_DENIED (-10)
307/** Version mismatch. */
308#define SUPDRV_ERR_VERSION_MISMATCH (-11)
309
310
311/** @name Context values for the per-session handle tables.
312 * The context value is used to distiguish between the different kinds of
313 * handles, making the handle table API do all the work.
314 * @{ */
315/** Handle context value for single release event handles. */
316#define SUPDRV_HANDLE_CTX_EVENT ((void *)(uintptr_t)(SUPDRVOBJTYPE_SEM_EVENT))
317/** Handle context value for multiple release event handles. */
318#define SUPDRV_HANDLE_CTX_EVENT_MULTI ((void *)(uintptr_t)(SUPDRVOBJTYPE_SEM_EVENT_MULTI))
319/** @} */
320
321
322/*******************************************************************************
323* Structures and Typedefs *
324*******************************************************************************/
325/** Pointer to the device extension. */
326typedef struct SUPDRVDEVEXT *PSUPDRVDEVEXT;
327
328
329/**
330 * Memory reference types.
331 */
332typedef enum
333{
334 /** Unused entry */
335 MEMREF_TYPE_UNUSED = 0,
336 /** Locked memory (r3 mapping only). */
337 MEMREF_TYPE_LOCKED,
338 /** Continous memory block (r3 and r0 mapping). */
339 MEMREF_TYPE_CONT,
340 /** Low memory block (r3 and r0 mapping). */
341 MEMREF_TYPE_LOW,
342 /** Memory block (r3 and r0 mapping). */
343 MEMREF_TYPE_MEM,
344 /** Locked memory (r3 mapping only) allocated by the support driver. */
345 MEMREF_TYPE_PAGE,
346 /** Blow the type up to 32-bit and mark the end. */
347 MEMREG_TYPE_32BIT_HACK = 0x7fffffff
348} SUPDRVMEMREFTYPE, *PSUPDRVMEMREFTYPE;
349
350
351/**
352 * Structure used for tracking memory a session
353 * references in one way or another.
354 */
355typedef struct SUPDRVMEMREF
356{
357 /** The memory object handle. */
358 RTR0MEMOBJ MemObj;
359 /** The ring-3 mapping memory object handle. */
360 RTR0MEMOBJ MapObjR3;
361 /** Type of memory. */
362 SUPDRVMEMREFTYPE eType;
363} SUPDRVMEMREF, *PSUPDRVMEMREF;
364
365
366/**
367 * Bundle of locked memory ranges.
368 */
369typedef struct SUPDRVBUNDLE
370{
371 /** Pointer to the next bundle. */
372 struct SUPDRVBUNDLE * volatile pNext;
373 /** Referenced memory. */
374 SUPDRVMEMREF aMem[64];
375 /** Number of entries used. */
376 uint32_t volatile cUsed;
377} SUPDRVBUNDLE, *PSUPDRVBUNDLE;
378
379
380/**
381 * Loaded image.
382 */
383typedef struct SUPDRVLDRIMAGE
384{
385 /** Next in chain. */
386 struct SUPDRVLDRIMAGE * volatile pNext;
387 /** Pointer to the image. */
388 void *pvImage;
389 /** Pointer to the optional module initialization callback. */
390 PFNR0MODULEINIT pfnModuleInit;
391 /** Pointer to the optional module termination callback. */
392 PFNR0MODULETERM pfnModuleTerm;
393 /** Service request handler. This is NULL for non-service modules. */
394 PFNSUPR0SERVICEREQHANDLER pfnServiceReqHandler;
395 /** Size of the image. */
396 uint32_t cbImage;
397 /** The offset of the symbol table. */
398 uint32_t offSymbols;
399 /** The number of entries in the symbol table. */
400 uint32_t cSymbols;
401 /** The offset of the string table. */
402 uint32_t offStrTab;
403 /** Size of the string table. */
404 uint32_t cbStrTab;
405 /** The ldr image state. (IOCtl code of last opration.) */
406 uint32_t uState;
407 /** Usage count. */
408 uint32_t volatile cUsage;
409 /** Image name. */
410 char szName[32];
411} SUPDRVLDRIMAGE, *PSUPDRVLDRIMAGE;
412
413
414/** Image usage record. */
415typedef struct SUPDRVLDRUSAGE
416{
417 /** Next in chain. */
418 struct SUPDRVLDRUSAGE * volatile pNext;
419 /** The image. */
420 PSUPDRVLDRIMAGE pImage;
421 /** Load count. */
422 uint32_t volatile cUsage;
423} SUPDRVLDRUSAGE, *PSUPDRVLDRUSAGE;
424
425
426/**
427 * Component factory registration record.
428 */
429typedef struct SUPDRVFACTORYREG
430{
431 /** Pointer to the next registration. */
432 struct SUPDRVFACTORYREG *pNext;
433 /** Pointer to the registered factory. */
434 PCSUPDRVFACTORY pFactory;
435 /** The session owning the factory.
436 * Used for deregistration and session cleanup. */
437 PSUPDRVSESSION pSession;
438 /** Length of the name. */
439 size_t cchName;
440} SUPDRVFACTORYREG;
441/** Pointer to a component factory registration record. */
442typedef SUPDRVFACTORYREG *PSUPDRVFACTORYREG;
443/** Pointer to a const component factory registration record. */
444typedef SUPDRVFACTORYREG const *PCSUPDRVFACTORYREG;
445
446
447/**
448 * Registered object.
449 * This takes care of reference counting and tracking data for access checks.
450 */
451typedef struct SUPDRVOBJ
452{
453 /** Magic value (SUPDRVOBJ_MAGIC). */
454 uint32_t u32Magic;
455 /** The object type. */
456 SUPDRVOBJTYPE enmType;
457 /** Pointer to the next in the global list. */
458 struct SUPDRVOBJ * volatile pNext;
459 /** Pointer to the object destructor.
460 * This may be set to NULL if the image containing the destructor get unloaded. */
461 PFNSUPDRVDESTRUCTOR pfnDestructor;
462 /** User argument 1. */
463 void *pvUser1;
464 /** User argument 2. */
465 void *pvUser2;
466 /** The total sum of all per-session usage. */
467 uint32_t volatile cUsage;
468 /** The creator user id. */
469 RTUID CreatorUid;
470 /** The creator group id. */
471 RTGID CreatorGid;
472 /** The creator process id. */
473 RTPROCESS CreatorProcess;
474} SUPDRVOBJ, *PSUPDRVOBJ;
475
476/** Magic number for SUPDRVOBJ::u32Magic. (Dame Agatha Mary Clarissa Christie). */
477#define SUPDRVOBJ_MAGIC 0x18900915
478/** Dead number magic for SUPDRVOBJ::u32Magic. */
479#define SUPDRVOBJ_MAGIC_DEAD 0x19760112
480
481/**
482 * The per-session object usage record.
483 */
484typedef struct SUPDRVUSAGE
485{
486 /** Pointer to the next in the list. */
487 struct SUPDRVUSAGE * volatile pNext;
488 /** Pointer to the object we're recording usage for. */
489 PSUPDRVOBJ pObj;
490 /** The usage count. */
491 uint32_t volatile cUsage;
492} SUPDRVUSAGE, *PSUPDRVUSAGE;
493
494
495/**
496 * Per session data.
497 * This is mainly for memory tracking.
498 */
499typedef struct SUPDRVSESSION
500{
501 /** Pointer to the device extension. */
502 PSUPDRVDEVEXT pDevExt;
503 /** Session Cookie. */
504 uint32_t u32Cookie;
505
506 /** The VM associated with the session. */
507 PVM pVM;
508 /** Handle table for IPRT semaphore wrapper APIs.
509 * Programmable from R0 and R3. */
510 RTHANDLETABLE hHandleTable;
511 /** Load usage records. (protected by SUPDRVDEVEXT::mtxLdr) */
512 PSUPDRVLDRUSAGE volatile pLdrUsage;
513
514 /** Spinlock protecting the bundles and the GIP members. */
515 RTSPINLOCK Spinlock;
516 /** The ring-3 mapping of the GIP (readonly). */
517 RTR0MEMOBJ GipMapObjR3;
518 /** Set if the session is using the GIP. */
519 uint32_t fGipReferenced;
520 /** Bundle of locked memory objects. */
521 SUPDRVBUNDLE Bundle;
522 /** List of generic usage records. (protected by SUPDRVDEVEXT::SpinLock) */
523 PSUPDRVUSAGE volatile pUsage;
524
525 /** The user id of the session. (Set by the OS part.) */
526 RTUID Uid;
527 /** The group id of the session. (Set by the OS part.) */
528 RTGID Gid;
529 /** The process (id) of the session. */
530 RTPROCESS Process;
531 /** Which process this session is associated with.
532 * This is NIL_RTR0PROCESS for kernel sessions and valid for user ones. */
533 RTR0PROCESS R0Process;
534#if defined(RT_OS_DARWIN)
535 /** Pointer to the associated org_virtualbox_SupDrvClient object. */
536 void *pvSupDrvClient;
537 /** Whether this session has been opened or not. */
538 bool fOpened;
539#endif
540#if defined(RT_OS_OS2)
541 /** The system file number of this session. */
542 uint16_t sfn;
543 uint16_t Alignment; /**< Alignment */
544#endif
545#if defined(RT_OS_DARWIN) || defined(RT_OS_OS2) || defined(RT_OS_SOLARIS)
546 /** Pointer to the next session with the same hash. */
547 PSUPDRVSESSION pNextHash;
548#endif
549} SUPDRVSESSION;
550
551
552/**
553 * Device extension.
554 */
555typedef struct SUPDRVDEVEXT
556{
557 /** Spinlock to serialize the initialization, usage counting and objects. */
558 RTSPINLOCK Spinlock;
559
560 /** List of registered objects. Protected by the spinlock. */
561 PSUPDRVOBJ volatile pObjs;
562 /** List of free object usage records. */
563 PSUPDRVUSAGE volatile pUsageFree;
564
565 /** Global cookie. */
566 uint32_t u32Cookie;
567
568 /** The IDT entry number.
569 * Only valid if pIdtPatches is set. */
570 uint8_t volatile u8Idt;
571
572 /** Loader mutex.
573 * This protects pvVMMR0, pvVMMR0Entry, pImages and SUPDRVSESSION::pLdrUsage. */
574 RTSEMFASTMUTEX mtxLdr;
575
576 /** VMM Module 'handle'.
577 * 0 if the code VMM isn't loaded and Idt are nops. */
578 void * volatile pvVMMR0;
579 /** VMMR0EntryInt() pointer. */
580 DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryInt, (PVM pVM, unsigned uOperation, void *pvArg));
581 /** VMMR0EntryFast() pointer. */
582 DECLR0CALLBACKMEMBER(void, pfnVMMR0EntryFast, (PVM pVM, VMCPUID idCpu, unsigned uOperation));
583 /** VMMR0EntryEx() pointer. */
584 DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryEx, (PVM pVM, VMCPUID idCpu, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession));
585
586 /** Linked list of loaded code. */
587 PSUPDRVLDRIMAGE volatile pLdrImages;
588
589 /** GIP mutex.
590 * Any changes to any of the GIP members requires ownership of this mutex,
591 * except on driver init and termination. */
592 RTSEMFASTMUTEX mtxGip;
593 /** Pointer to the Global Info Page (GIP). */
594 PSUPGLOBALINFOPAGE pGip;
595 /** The physical address of the GIP. */
596 RTHCPHYS HCPhysGip;
597 /** Number of processes using the GIP.
598 * (The updates are suspend while cGipUsers is 0.)*/
599 uint32_t volatile cGipUsers;
600 /** The ring-0 memory object handle for the GIP page. */
601 RTR0MEMOBJ GipMemObj;
602 /** The GIP timer handle. */
603 PRTTIMER pGipTimer;
604 /** If non-zero we've successfully called RTTimerRequestSystemGranularity(). */
605 uint32_t u32SystemTimerGranularityGrant;
606 /** The CPU id of the GIP master.
607 * This CPU is responsible for the updating the common GIP data. */
608 RTCPUID volatile idGipMaster;
609
610#ifdef RT_OS_WINDOWS
611 /* Callback object returned by ExCreateCallback. */
612 PCALLBACK_OBJECT pObjPowerCallback;
613 /* Callback handle returned by ExRegisterCallback. */
614 PVOID hPowerCallback;
615#endif
616
617 /** Component factory mutex.
618 * This protects pComponentFactoryHead and component factory querying. */
619 RTSEMFASTMUTEX mtxComponentFactory;
620 /** The head of the list of registered component factories. */
621 PSUPDRVFACTORYREG pComponentFactoryHead;
622} SUPDRVDEVEXT;
623
624
625RT_C_DECLS_BEGIN
626
627/*******************************************************************************
628* OS Specific Functions *
629*******************************************************************************/
630void VBOXCALL supdrvOSObjInitCreator(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession);
631bool VBOXCALL supdrvOSObjCanAccess(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession, const char *pszObjName, int *prc);
632bool VBOXCALL supdrvOSGetForcedAsyncTscMode(PSUPDRVDEVEXT pDevExt);
633int VBOXCALL supdrvOSEnableVTx(bool fEnabled);
634
635/*******************************************************************************
636* Shared Functions *
637*******************************************************************************/
638int VBOXCALL supdrvIOCtl(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPREQHDR pReqHdr);
639int VBOXCALL supdrvIOCtlFast(uintptr_t uIOCtl, VMCPUID idCpu, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
640int VBOXCALL supdrvIDC(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPDRVIDCREQHDR pReqHdr);
641int VBOXCALL supdrvInitDevExt(PSUPDRVDEVEXT pDevExt);
642void VBOXCALL supdrvDeleteDevExt(PSUPDRVDEVEXT pDevExt);
643int VBOXCALL supdrvCreateSession(PSUPDRVDEVEXT pDevExt, bool fUser, PSUPDRVSESSION *ppSession);
644void VBOXCALL supdrvCloseSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
645void VBOXCALL supdrvCleanupSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
646int VBOXCALL supdrvGipInit(PSUPDRVDEVEXT pDevExt, PSUPGLOBALINFOPAGE pGip, RTHCPHYS HCPhys, uint64_t u64NanoTS, unsigned uUpdateHz);
647void VBOXCALL supdrvGipTerm(PSUPGLOBALINFOPAGE pGip);
648void VBOXCALL supdrvGipUpdate(PSUPGLOBALINFOPAGE pGip, uint64_t u64NanoTS);
649void VBOXCALL supdrvGipUpdatePerCpu(PSUPGLOBALINFOPAGE pGip, uint64_t u64NanoTS, unsigned iCpu);
650bool VBOXCALL supdrvDetermineAsyncTsc(uint64_t *pu64DiffCores);
651
652RT_C_DECLS_END
653
654#endif
655
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