VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/Support/SUPDRV.h@ 1003

Last change on this file since 1003 was 679, checked in by vboxsync, 18 years ago

WIN32 / WIN64.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 21.0 KB
Line 
1/** @file
2 *
3 * VBox host drivers - Ring-0 support drivers - Shared code:
4 * Shared definitions for all host platforms
5 */
6
7/*
8 * Copyright (C) 2006 InnoTek Systemberatung GmbH
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License as published by the Free Software Foundation,
14 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
15 * distribution. VirtualBox OSE is distributed in the hope that it will
16 * be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * If you received this file as part of a commercial VirtualBox
19 * distribution, then only the terms of your commercial VirtualBox
20 * license agreement apply instead of the previous paragraph.
21 */
22
23#ifndef __SUPDRV_h__
24#define __SUPDRV_h__
25
26
27/*******************************************************************************
28* Header Files *
29*******************************************************************************/
30#include <VBox/cdefs.h>
31#include <VBox/types.h>
32#include <iprt/assert.h>
33#include <iprt/asm.h>
34#include <VBox/sup.h>
35#ifdef USE_NEW_OS_INTERFACE
36# include <iprt/memobj.h>
37# include <iprt/time.h>
38# include <iprt/timer.h>
39#endif
40
41
42#if defined(__WIN__)
43 __BEGIN_DECLS
44# if (_MSC_VER >= 1400) && !defined(VBOX_WITH_PATCHED_DDK)
45# define _InterlockedExchange _InterlockedExchange_StupidDDKVsCompilerCrap
46# define _InterlockedExchangeAdd _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
47# define _InterlockedCompareExchange _InterlockedCompareExchange_StupidDDKVsCompilerCrap
48# define _InterlockedAddLargeStatistic _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
49# include <ntddk.h>
50# undef _InterlockedExchange
51# undef _InterlockedExchangeAdd
52# undef _InterlockedCompareExchange
53# undef _InterlockedAddLargeStatistic
54# else
55# include <ntddk.h>
56# endif
57# include <memory.h>
58# define memcmp(a,b,c) mymemcmp(a,b,c)
59 int VBOXCALL mymemcmp(const void *, const void *, size_t);
60 __END_DECLS
61
62#elif defined(__LINUX__)
63# include <linux/autoconf.h>
64# include <linux/version.h>
65# if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
66# define MODVERSIONS
67# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 71)
68# include <linux/modversions.h>
69# endif
70# endif
71# if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 0)
72# undef ALIGN
73# endif
74# ifndef KBUILD_STR
75# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
76# define KBUILD_STR(s) s
77# else
78# define KBUILD_STR(s) #s
79# endif
80# endif
81# include <linux/string.h>
82# include <linux/spinlock.h>
83# include <linux/slab.h>
84# include <asm/semaphore.h>
85
86#elif defined(__DARWIN__)
87# include <libkern/libkern.h>
88# include <iprt/string.h>
89
90#else
91# error "unsupported OS."
92#endif
93
94#include "SUPDRVIOC.h"
95
96
97
98/*******************************************************************************
99* Defined Constants And Macros *
100*******************************************************************************/
101/*
102 * Hardcoded cookies.
103 */
104#define BIRD 0x64726962 /* 'bird' */
105#define BIRD_INV 0x62697264 /* 'drib' */
106
107
108/*
109 * Win32
110 */
111#if defined(__WIN__)
112
113/* debug printf */
114# define OSDBGPRINT(a) DbgPrint a
115
116/** Maximum number of bytes we try to lock down in one go.
117 * This is supposed to have a limit right below 256MB, but this appears
118 * to actually be much lower. The values here have been determined experimentally.
119 */
120#ifdef __X86__
121# define MAX_LOCK_MEM_SIZE (32*1024*1024) /* 32mb */
122#endif
123#ifdef __AMD64__
124# define MAX_LOCK_MEM_SIZE (24*1024*1024) /* 24mb */
125#endif
126
127
128/*
129 * Linux
130 */
131#elif defined(__LINUX__)
132
133/* check kernel version */
134#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0)
135# error Unsupported kernel version!
136#endif
137
138__BEGIN_DECLS
139int linux_dprintf(const char *format, ...);
140__END_DECLS
141
142/* debug printf */
143# define OSDBGPRINT(a) printk a
144
145
146/*
147 * Darwin
148 */
149#elif defined(__DARWIN__)
150
151/* debug printf */
152# define OSDBGPRINT(a) printf a
153
154#else
155/** @todo other os'es */
156# error "OS interface defines is not done for this OS!"
157#endif
158
159
160/* dprintf */
161#if defined(DEBUG) && !defined(NO_LOGGING)
162# ifdef LOG_TO_COM
163# include <VBox/log.h>
164# define dprintf(a) RTLogComPrintf a
165# else
166# define dprintf(a) OSDBGPRINT(a)
167# endif
168#else
169# define dprintf(a) do {} while (0)
170#endif
171
172/* dprintf2 - extended logging. */
173#if defined(__DARWIN__)
174# define dprintf2 dprintf
175#else
176# define dprintf2(a) do { } while (0)
177#endif
178
179
180/*
181 * Error codes.
182 */
183/** Invalid parameter. */
184#define SUPDRV_ERR_GENERAL_FAILURE (-1)
185/** Invalid parameter. */
186#define SUPDRV_ERR_INVALID_PARAM (-2)
187/** Invalid magic or cookie. */
188#define SUPDRV_ERR_INVALID_MAGIC (-3)
189/** Invalid loader handle. */
190#define SUPDRV_ERR_INVALID_HANDLE (-4)
191/** Failed to lock the address range. */
192#define SUPDRV_ERR_LOCK_FAILED (-5)
193/** Invalid memory pointer. */
194#define SUPDRV_ERR_INVALID_POINTER (-6)
195/** Failed to patch the IDT. */
196#define SUPDRV_ERR_IDT_FAILED (-7)
197/** Memory allocation failed. */
198#define SUPDRV_ERR_NO_MEMORY (-8)
199/** Already loaded. */
200#define SUPDRV_ERR_ALREADY_LOADED (-9)
201/** Permission denied. */
202#define SUPDRV_ERR_PERMISSION_DENIED (-10)
203/** Version mismatch. */
204#define SUPDRV_ERR_VERSION_MISMATCH (-11)
205
206
207
208/*******************************************************************************
209* Structures and Typedefs *
210*******************************************************************************/
211/** Pointer to the device extension. */
212typedef struct SUPDRVDEVEXT *PSUPDRVDEVEXT;
213
214#ifndef VBOX_WITHOUT_IDT_PATCHING
215
216/**
217 * An IDT Entry.
218 */
219typedef struct SUPDRVIDTE
220{
221 /** Low offset word. */
222 uint32_t u16OffsetLow : 16;
223 /** Segment Selector. */
224 uint32_t u16SegSel : 16;
225#ifdef __AMD64__
226 /** Interrupt Stack Table index. */
227 uint32_t u3IST : 3;
228 /** Reserved, ignored. */
229 uint32_t u5Reserved : 5;
230#else
231 /** Reserved. */
232 uint32_t u5Reserved : 5;
233 /** IDT Type part one (not used for task gate). */
234 uint32_t u3Type1 : 3;
235#endif
236 /** IDT Type part two. */
237 uint32_t u5Type2 : 5;
238 /** Descriptor Privilege level. */
239 uint32_t u2DPL : 2;
240 /** Present flag. */
241 uint32_t u1Present : 1;
242 /** High offset word. */
243 uint32_t u16OffsetHigh : 16;
244#ifdef __AMD64__
245 /** The upper top part of the address. */
246 uint32_t u32OffsetTop;
247 /** Reserved dword for qword (aligning the struct), ignored. */
248 uint32_t u32Reserved;
249#endif
250} SUPDRVIDTE, *PSUPDRVIDTE;
251
252/** The u5Type2 value for an interrupt gate. */
253#define SUPDRV_IDTE_TYPE2_INTERRUPT_GATE 0x0e
254
255
256/**
257 * Patch code.
258 */
259typedef struct SUPDRVPATCH
260{
261#define SUPDRV_PATCH_CODE_SIZE 0x50
262 /** Patch code. */
263 uint8_t auCode[SUPDRV_PATCH_CODE_SIZE];
264 /** Changed IDT entry (for parnoid UnpatchIdt()). */
265 SUPDRVIDTE ChangedIdt;
266 /** Saved IDT entry. */
267 SUPDRVIDTE SavedIdt;
268 /** Pointer to the IDT.
269 * We ASSUME the IDT is not re(al)located after bootup and use this as key
270 * for the patches rather than processor number. This prevents some
271 * stupid nesting stuff from happening in case of processors sharing the
272 * IDT.
273 * We're fucked if the processors have different physical mapping for
274 * the(se) page(s), but we'll find that out soon enough in VBOX_STRICT mode.
275 */
276 void *pvIdt;
277 /** Pointer to the IDT entry. */
278 SUPDRVIDTE volatile *pIdtEntry;
279 /** Usage counter. */
280 uint32_t volatile cUsage;
281 /** The offset into auCode of the VMMR0Entry fixup. */
282 uint16_t offVMMR0EntryFixup;
283 /** The offset into auCode of the stub function. */
284 uint16_t offStub;
285 /** Pointer to the next patch. */
286 struct SUPDRVPATCH * volatile pNext;
287} SUPDRVPATCH, *PSUPDRVPATCH;
288
289/**
290 * Usage record for a patch.
291 */
292typedef struct SUPDRVPATCHUSAGE
293{
294 /** Next in the chain. */
295 struct SUPDRVPATCHUSAGE * volatile pNext;
296 /** The patch this usage applies to. */
297 PSUPDRVPATCH pPatch;
298 /** Usage count. */
299 uint32_t volatile cUsage;
300} SUPDRVPATCHUSAGE, *PSUPDRVPATCHUSAGE;
301
302#endif /* !VBOX_WITHOUT_IDT_PATCHING */
303
304
305/**
306 * Memory reference types.
307 */
308typedef enum
309{
310 /** Unused entry */
311 MEMREF_TYPE_UNUSED = 0,
312 /** Locked memory (r3 mapping only). */
313 MEMREF_TYPE_LOCKED,
314 /** Continous memory block (r3 and r0 mapping). */
315 MEMREF_TYPE_CONT,
316 /** Low memory block (r3 and r0 mapping). */
317 MEMREF_TYPE_LOW,
318 /** Memory block (r3 and r0 mapping). */
319 MEMREF_TYPE_MEM,
320 /** Blow the type up to 32-bit and mark the end. */
321 MEMREG_TYPE_32BIT_HACK = 0x7fffffff
322} SUPDRVMEMREFTYPE, *PSUPDRVMEMREFTYPE;
323
324
325/**
326 * Structure used for tracking memory a session
327 * references in one way or another.
328 */
329typedef struct SUPDRVMEMREF
330{
331#ifdef USE_NEW_OS_INTERFACE
332 /** The memory object handle. */
333 RTR0MEMOBJ MemObj;
334 /** The ring-3 mapping memory object handle. */
335 RTR0MEMOBJ MapObjR3;
336 /** Type of memory. */
337 SUPDRVMEMREFTYPE eType;
338
339#else /* !USE_NEW_OS_INTERFACE */
340 /** Pointer to the R0 mapping of the memory.
341 * Set to NULL if N/A. */
342 void *pvR0;
343 /** Pointer to the R3 mapping of the memory.
344 * Set to NULL if N/A. */
345 void *pvR3;
346 /** Size of the locked memory. */
347 unsigned cb;
348 /** Type of memory. */
349 SUPDRVMEMREFTYPE eType;
350
351 /** memory type specific information. */
352 union
353 {
354 struct
355 {
356#if defined(__WIN__)
357 /** Pointer to memory descriptor list (MDL). */
358 PMDL *papMdl;
359 unsigned cMdls;
360#elif defined(__LINUX__)
361 struct page **papPages;
362 unsigned cPages;
363#else
364# error "Either no target was defined or we haven't ported the driver to the target yet."
365#endif
366 } locked;
367 struct
368 {
369#if defined(__WIN__)
370 /** Pointer to memory descriptor list (MDL). */
371 PMDL pMdl;
372#elif defined(__LINUX__)
373 struct page *paPages;
374 unsigned cPages;
375#else
376# error "Either no target was defined or we haven't ported the driver to the target yet."
377#endif
378 } cont;
379 struct
380 {
381#if defined(__WIN__)
382 /** Pointer to memory descriptor list (MDL). */
383 PMDL pMdl;
384#elif defined(__LINUX__)
385 /** Pointer to the array of page pointers. */
386 struct page **papPages;
387 /** Number of pages in papPages. */
388 unsigned cPages;
389#else
390# error "Either no target was defined or we haven't ported the driver to the target yet."
391#endif
392 } mem;
393 } u;
394#endif /* !USE_NEW_OS_INTERFACE */
395} SUPDRVMEMREF, *PSUPDRVMEMREF;
396
397
398/**
399 * Bundle of locked memory ranges.
400 */
401typedef struct SUPDRVBUNDLE
402{
403 /** Pointer to the next bundle. */
404 struct SUPDRVBUNDLE * volatile pNext;
405 /** Referenced memory. */
406 SUPDRVMEMREF aMem[64];
407 /** Number of entries used. */
408 uint32_t volatile cUsed;
409} SUPDRVBUNDLE, *PSUPDRVBUNDLE;
410
411
412/**
413 * Loaded image.
414 */
415typedef struct SUPDRVLDRIMAGE
416{
417 /** Next in chain. */
418 struct SUPDRVLDRIMAGE * volatile pNext;
419 /** Pointer to the image. */
420 void *pvImage;
421 /** Pointer to the optional module initialization callback. */
422 PFNR0MODULEINIT pfnModuleInit;
423 /** Pointer to the optional module termination callback. */
424 PFNR0MODULETERM pfnModuleTerm;
425 /** Size of the image. */
426 uint32_t cbImage;
427 /** The offset of the symbol table. */
428 uint32_t offSymbols;
429 /** The number of entries in the symbol table. */
430 uint32_t cSymbols;
431 /** The offset of the string table. */
432 uint32_t offStrTab;
433 /** Size of the string table. */
434 uint32_t cbStrTab;
435 /** The ldr image state. (IOCtl code of last opration.) */
436 uint32_t uState;
437 /** Usage count. */
438 uint32_t volatile cUsage;
439 /** Image name. */
440 char szName[32];
441} SUPDRVLDRIMAGE, *PSUPDRVLDRIMAGE;
442
443
444/** Image usage record. */
445typedef struct SUPDRVLDRUSAGE
446{
447 /** Next in chain. */
448 struct SUPDRVLDRUSAGE * volatile pNext;
449 /** The image. */
450 PSUPDRVLDRIMAGE pImage;
451 /** Load count. */
452 uint32_t volatile cUsage;
453} SUPDRVLDRUSAGE, *PSUPDRVLDRUSAGE;
454
455
456/**
457 * Registered object.
458 * This takes care of reference counting and tracking data for access checks.
459 */
460typedef struct SUPDRVOBJ
461{
462 /** Magic value (SUPDRVOBJ_MAGIC). */
463 uint32_t u32Magic;
464 /** The object type. */
465 SUPDRVOBJTYPE enmType;
466 /** Pointer to the next in the global list. */
467 struct SUPDRVOBJ * volatile pNext;
468 /** Pointer to the object destructor. */
469 PFNSUPDRVDESTRUCTOR pfnDestructor;
470 /** User argument 1. */
471 void *pvUser1;
472 /** User argument 2. */
473 void *pvUser2;
474 /** The total sum of all per-session usage. */
475 uint32_t volatile cUsage;
476 /** The creator user id. */
477 RTUID CreatorUid;
478 /** The creator group id. */
479 RTGID CreatorGid;
480 /** The creator process id. */
481 RTPROCESS CreatorProcess;
482} SUPDRVOBJ, *PSUPDRVOBJ;
483
484/** Magic number for SUPDRVOBJ::u32Magic. (Dame Agatha Mary Clarissa Christie). */
485#define SUPDRVOBJ_MAGIC 0x18900915
486
487/**
488 * The per-session object usage record.
489 */
490typedef struct SUPDRVUSAGE
491{
492 /** Pointer to the next in the list. */
493 struct SUPDRVUSAGE * volatile pNext;
494 /** Pointer to the object we're recording usage for. */
495 PSUPDRVOBJ pObj;
496 /** The usage count. */
497 uint32_t volatile cUsage;
498} SUPDRVUSAGE, *PSUPDRVUSAGE;
499
500
501/**
502 * Per session data.
503 * This is mainly for memory tracking.
504 */
505typedef struct SUPDRVSESSION
506{
507 /** Pointer to the device extension. */
508 PSUPDRVDEVEXT pDevExt;
509 /** Session Cookie. */
510 uint32_t u32Cookie;
511
512 /** Load usage records. (protected by SUPDRVDEVEXT::mtxLdr) */
513 PSUPDRVLDRUSAGE volatile pLdrUsage;
514#ifndef VBOX_WITHOUT_IDT_PATCHING
515 /** Patch usage records. (protected by SUPDRVDEVEXT::SpinLock) */
516 PSUPDRVPATCHUSAGE volatile pPatchUsage;
517#else
518 /** The VM associated with the session. */
519 PVM pVM;
520#endif
521 /** List of generic usage records. (protected by SUPDRVDEVEXT::SpinLock) */
522 PSUPDRVUSAGE volatile pUsage;
523
524 /** Spinlock protecting the bundles and the GIP members. */
525 RTSPINLOCK Spinlock;
526#ifdef USE_NEW_OS_INTERFACE
527 /** The ring-3 mapping of the GIP (readonly). */
528 RTR0MEMOBJ GipMapObjR3;
529#else
530 /** The read-only usermode mapping address of the GID.
531 * This is NULL if the GIP hasn't been mapped. */
532 PCSUPGLOBALINFOPAGE pGip;
533#endif
534 /** Set if the session is using the GIP. */
535 uint32_t fGipReferenced;
536 /** Bundle of locked memory objects. */
537 SUPDRVBUNDLE Bundle;
538
539 /** The user id of the session. (Set by the OS part.) */
540 RTUID Uid;
541 /** The group id of the session. (Set by the OS part.) */
542 RTGID Gid;
543 /** The process (id) of the session. (Set by the OS part.) */
544 RTPROCESS Process;
545 /** Which process this session is associated with. */
546 RTR0PROCESS R0Process;
547#if defined(__DARWIN__) || defined(__OS2__)
548 /** Pointer to the next session with the same has. */
549 PSUPDRVSESSION pNextHash;
550#endif
551} SUPDRVSESSION;
552
553
554/**
555 * Device extension.
556 */
557typedef struct SUPDRVDEVEXT
558{
559 /** Spinlock to serialize the initialization,
560 * usage counting and destruction of the IDT entry override. */
561 RTSPINLOCK Spinlock;
562
563#ifndef VBOX_WITHOUT_IDT_PATCHING
564 /** List of patches. */
565 PSUPDRVPATCH volatile pIdtPatches;
566 /** List of patches Free. */
567 PSUPDRVPATCH volatile pIdtPatchesFree;
568#endif
569
570 /** List of registered objects. */
571 PSUPDRVOBJ volatile pObjs;
572 /** List of free object usage records. */
573 PSUPDRVUSAGE volatile pUsageFree;
574
575 /** Global cookie. */
576 uint32_t u32Cookie;
577
578 /** The IDT entry number.
579 * Only valid if pIdtPatches is set. */
580 uint8_t volatile u8Idt;
581
582 /** Loader mutex.
583 * This protects pvVMMR0, pvVMMR0Entry, pImages and SUPDRVSESSION::pLdrUsage. */
584 RTSEMFASTMUTEX mtxLdr;
585
586 /** VMM Module 'handle'.
587 * 0 if the code VMM isn't loaded and Idt are nops. */
588 void * volatile pvVMMR0;
589 /** VMMR0Entry() pointer. */
590 DECLCALLBACKMEMBER(int, pfnVMMR0Entry)(PVM pVM, unsigned uOperation, void *pvArg);
591
592 /** Linked list of loaded code. */
593 PSUPDRVLDRIMAGE volatile pLdrImages;
594
595 /** GIP mutex.
596 * Any changes to any of the GIP members requires ownership of this mutex,
597 * except on driver init and termination. */
598 RTSEMFASTMUTEX mtxGip;
599 /** Pointer to the Global Info Page (GIP). */
600 PSUPGLOBALINFOPAGE pGip;
601 /** The physical address of the GIP. */
602 RTHCPHYS HCPhysGip;
603 /** Number of processes using the GIP.
604 * (The updates are suspend while cGipUsers is 0.)*/
605 uint32_t volatile cGipUsers;
606#ifdef USE_NEW_OS_INTERFACE
607 /** The ring-0 memory object handle for the GIP page. */
608 RTR0MEMOBJ GipMemObj;
609 /** The GIP timer handle. */
610 PRTTIMER pGipTimer;
611 /** If non-zero we've successfully called RTTimerRequestSystemGranularity(). */
612 uint32_t u32SystemTimerGranularityGrant;
613#endif
614#ifdef __WIN__
615 /** The GIP timer object. */
616 KTIMER GipTimer;
617 /** The GIP DPC object associated with GipTimer. */
618 KDPC GipDpc;
619 /** Pointer to the MDL for the pGip page. */
620 PMDL pGipMdl;
621 /** GIP timer interval (ms). */
622 ULONG ulGipTimerInterval;
623#endif
624#ifdef __LINUX__
625 /** The last jiffies. */
626 unsigned long ulLastJiffies;
627 /** The last mono time stamp. */
628 uint64_t u64LastMonotime;
629#endif
630} SUPDRVDEVEXT;
631
632
633__BEGIN_DECLS
634
635/*******************************************************************************
636* OS Specific Functions *
637*******************************************************************************/
638void VBOXCALL supdrvOSObjInitCreator(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession);
639bool VBOXCALL supdrvOSObjCanAccess(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession, const char *pszObjName, int *prc);
640#ifndef USE_NEW_OS_INTERFACE
641int VBOXCALL supdrvOSLockMemOne(PSUPDRVMEMREF pMem, PSUPPAGE paPages);
642void VBOXCALL supdrvOSUnlockMemOne(PSUPDRVMEMREF pMem);
643int VBOXCALL supdrvOSContAllocOne(PSUPDRVMEMREF pMem, void **ppvR0, void **ppvR3, PRTHCPHYS pHCPhys);
644void VBOXCALL supdrvOSContFreeOne(PSUPDRVMEMREF pMem);
645int VBOXCALL supdrvOSLowAllocOne(PSUPDRVMEMREF pMem, void **ppvR3, PSUPPAGE paPages);
646void VBOXCALL supdrvOSLowFreeOne(PSUPDRVMEMREF pMem);
647int VBOXCALL supdrvOSMemAllocOne(PSUPDRVMEMREF pMem, void **ppvR0, void **ppvR3);
648void VBOXCALL supdrvOSMemGetPages(PSUPDRVMEMREF pMem, PSUPPAGE paPages);
649void VBOXCALL supdrvOSMemFreeOne(PSUPDRVMEMREF pMem);
650int VBOXCALL supdrvOSGipMap(PSUPDRVDEVEXT pDevExt, PCSUPGLOBALINFOPAGE *ppGip);
651int VBOXCALL supdrvOSGipUnmap(PSUPDRVDEVEXT pDevExt, PCSUPGLOBALINFOPAGE pGip);
652void VBOXCALL supdrvOSGipResume(PSUPDRVDEVEXT pDevExt);
653void VBOXCALL supdrvOSGipSuspend(PSUPDRVDEVEXT pDevExt);
654#endif
655
656
657/*******************************************************************************
658* Shared Functions *
659*******************************************************************************/
660int VBOXCALL supdrvIOCtl(unsigned uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession,
661 void *pvIn, unsigned cbIn, void *pvOut, unsigned cbOut, unsigned *pcbReturned);
662#ifdef VBOX_WITHOUT_IDT_PATCHING
663int VBOXCALL supdrvIOCtlFast(unsigned uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
664#endif
665int VBOXCALL supdrvInitDevExt(PSUPDRVDEVEXT pDevExt);
666int VBOXCALL supdrvDeleteDevExt(PSUPDRVDEVEXT pDevExt);
667int VBOXCALL supdrvCreateSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION *ppSession);
668void VBOXCALL supdrvCloseSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
669void VBOXCALL supdrvCleanupSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
670int VBOXCALL supdrvGipInit(PSUPDRVDEVEXT pDevExt, PSUPGLOBALINFOPAGE pGip, RTHCPHYS HCPhys, uint64_t u64NanoTS, unsigned uUpdateHz);
671void VBOXCALL supdrvGipTerm(PSUPGLOBALINFOPAGE pGip);
672void VBOXCALL supdrvGipUpdate(PSUPGLOBALINFOPAGE pGip, uint64_t u64NanoTS);
673
674__END_DECLS
675
676#endif
677
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