VirtualBox

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

Last change on this file since 10251 was 10251, checked in by vboxsync, 16 years ago

fixed comment.

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