VirtualBox

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

Last change on this file since 10249 was 10249, checked in by vboxsync, 17 years ago

Removed non-USE_NEW_OS_INTERFACE_FOR_MM code.

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