VirtualBox

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

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

todo.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 20.3 KB
Line 
1/* $Revision: 10253 $ */
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/** @todo retire the SUPDRV_ERR_* stuff, we ship err.h now. */
242/** Invalid parameter. */
243#define SUPDRV_ERR_GENERAL_FAILURE (-1)
244/** Invalid parameter. */
245#define SUPDRV_ERR_INVALID_PARAM (-2)
246/** Invalid magic or cookie. */
247#define SUPDRV_ERR_INVALID_MAGIC (-3)
248/** Invalid loader handle. */
249#define SUPDRV_ERR_INVALID_HANDLE (-4)
250/** Failed to lock the address range. */
251#define SUPDRV_ERR_LOCK_FAILED (-5)
252/** Invalid memory pointer. */
253#define SUPDRV_ERR_INVALID_POINTER (-6)
254/** Failed to patch the IDT. */
255#define SUPDRV_ERR_IDT_FAILED (-7)
256/** Memory allocation failed. */
257#define SUPDRV_ERR_NO_MEMORY (-8)
258/** Already loaded. */
259#define SUPDRV_ERR_ALREADY_LOADED (-9)
260/** Permission denied. */
261#define SUPDRV_ERR_PERMISSION_DENIED (-10)
262/** Version mismatch. */
263#define SUPDRV_ERR_VERSION_MISMATCH (-11)
264
265
266
267/*******************************************************************************
268* Structures and Typedefs *
269*******************************************************************************/
270/** Pointer to the device extension. */
271typedef struct SUPDRVDEVEXT *PSUPDRVDEVEXT;
272
273#ifdef VBOX_WITH_IDT_PATCHING
274
275/**
276 * An IDT Entry.
277 */
278typedef struct SUPDRVIDTE
279{
280 /** Low offset word. */
281 uint32_t u16OffsetLow : 16;
282 /** Segment Selector. */
283 uint32_t u16SegSel : 16;
284#ifdef RT_ARCH_AMD64
285 /** Interrupt Stack Table index. */
286 uint32_t u3IST : 3;
287 /** Reserved, ignored. */
288 uint32_t u5Reserved : 5;
289#else
290 /** Reserved. */
291 uint32_t u5Reserved : 5;
292 /** IDT Type part one (not used for task gate). */
293 uint32_t u3Type1 : 3;
294#endif
295 /** IDT Type part two. */
296 uint32_t u5Type2 : 5;
297 /** Descriptor Privilege level. */
298 uint32_t u2DPL : 2;
299 /** Present flag. */
300 uint32_t u1Present : 1;
301 /** High offset word. */
302 uint32_t u16OffsetHigh : 16;
303#ifdef RT_ARCH_AMD64
304 /** The upper top part of the address. */
305 uint32_t u32OffsetTop;
306 /** Reserved dword for qword (aligning the struct), ignored. */
307 uint32_t u32Reserved;
308#endif
309} SUPDRVIDTE, *PSUPDRVIDTE;
310
311/** The u5Type2 value for an interrupt gate. */
312#define SUPDRV_IDTE_TYPE2_INTERRUPT_GATE 0x0e
313
314
315/**
316 * Patch code.
317 */
318typedef struct SUPDRVPATCH
319{
320#define SUPDRV_PATCH_CODE_SIZE 0x50
321 /** Patch code. */
322 uint8_t auCode[SUPDRV_PATCH_CODE_SIZE];
323 /** Changed IDT entry (for parnoid UnpatchIdt()). */
324 SUPDRVIDTE ChangedIdt;
325 /** Saved IDT entry. */
326 SUPDRVIDTE SavedIdt;
327 /** Pointer to the IDT.
328 * We ASSUME the IDT is not re(al)located after bootup and use this as key
329 * for the patches rather than processor number. This prevents some
330 * stupid nesting stuff from happening in case of processors sharing the
331 * IDT.
332 * We're fucked if the processors have different physical mapping for
333 * the(se) page(s), but we'll find that out soon enough in VBOX_STRICT mode.
334 */
335 void *pvIdt;
336 /** Pointer to the IDT entry. */
337 SUPDRVIDTE volatile *pIdtEntry;
338 /** Usage counter. */
339 uint32_t volatile cUsage;
340 /** The offset into auCode of the VMMR0Entry fixup. */
341 uint16_t offVMMR0EntryFixup;
342 /** The offset into auCode of the stub function. */
343 uint16_t offStub;
344 /** Pointer to the next patch. */
345 struct SUPDRVPATCH * volatile pNext;
346} SUPDRVPATCH, *PSUPDRVPATCH;
347
348/**
349 * Usage record for a patch.
350 */
351typedef struct SUPDRVPATCHUSAGE
352{
353 /** Next in the chain. */
354 struct SUPDRVPATCHUSAGE * volatile pNext;
355 /** The patch this usage applies to. */
356 PSUPDRVPATCH pPatch;
357 /** Usage count. */
358 uint32_t volatile cUsage;
359} SUPDRVPATCHUSAGE, *PSUPDRVPATCHUSAGE;
360
361#endif /* VBOX_WITH_IDT_PATCHING */
362
363
364/**
365 * Memory reference types.
366 */
367typedef enum
368{
369 /** Unused entry */
370 MEMREF_TYPE_UNUSED = 0,
371 /** Locked memory (r3 mapping only). */
372 MEMREF_TYPE_LOCKED,
373 /** Continous memory block (r3 and r0 mapping). */
374 MEMREF_TYPE_CONT,
375 /** Low memory block (r3 and r0 mapping). */
376 MEMREF_TYPE_LOW,
377 /** Memory block (r3 and r0 mapping). */
378 MEMREF_TYPE_MEM,
379 /** Locked memory (r3 mapping only) allocated by the support driver. */
380 MEMREF_TYPE_LOCKED_SUP,
381 /** Blow the type up to 32-bit and mark the end. */
382 MEMREG_TYPE_32BIT_HACK = 0x7fffffff
383} SUPDRVMEMREFTYPE, *PSUPDRVMEMREFTYPE;
384
385
386/**
387 * Structure used for tracking memory a session
388 * references in one way or another.
389 */
390typedef struct SUPDRVMEMREF
391{
392 /** The memory object handle. */
393 RTR0MEMOBJ MemObj;
394 /** The ring-3 mapping memory object handle. */
395 RTR0MEMOBJ MapObjR3;
396 /** Type of memory. */
397 SUPDRVMEMREFTYPE eType;
398} SUPDRVMEMREF, *PSUPDRVMEMREF;
399
400
401/**
402 * Bundle of locked memory ranges.
403 */
404typedef struct SUPDRVBUNDLE
405{
406 /** Pointer to the next bundle. */
407 struct SUPDRVBUNDLE * volatile pNext;
408 /** Referenced memory. */
409 SUPDRVMEMREF aMem[64];
410 /** Number of entries used. */
411 uint32_t volatile cUsed;
412} SUPDRVBUNDLE, *PSUPDRVBUNDLE;
413
414
415/**
416 * Loaded image.
417 */
418typedef struct SUPDRVLDRIMAGE
419{
420 /** Next in chain. */
421 struct SUPDRVLDRIMAGE * volatile pNext;
422 /** Pointer to the image. */
423 void *pvImage;
424 /** Pointer to the optional module initialization callback. */
425 PFNR0MODULEINIT pfnModuleInit;
426 /** Pointer to the optional module termination callback. */
427 PFNR0MODULETERM pfnModuleTerm;
428 /** Size of the image. */
429 uint32_t cbImage;
430 /** The offset of the symbol table. */
431 uint32_t offSymbols;
432 /** The number of entries in the symbol table. */
433 uint32_t cSymbols;
434 /** The offset of the string table. */
435 uint32_t offStrTab;
436 /** Size of the string table. */
437 uint32_t cbStrTab;
438 /** The ldr image state. (IOCtl code of last opration.) */
439 uint32_t uState;
440 /** Usage count. */
441 uint32_t volatile cUsage;
442 /** Image name. */
443 char szName[32];
444} SUPDRVLDRIMAGE, *PSUPDRVLDRIMAGE;
445
446
447/** Image usage record. */
448typedef struct SUPDRVLDRUSAGE
449{
450 /** Next in chain. */
451 struct SUPDRVLDRUSAGE * volatile pNext;
452 /** The image. */
453 PSUPDRVLDRIMAGE pImage;
454 /** Load count. */
455 uint32_t volatile cUsage;
456} SUPDRVLDRUSAGE, *PSUPDRVLDRUSAGE;
457
458
459/**
460 * Registered object.
461 * This takes care of reference counting and tracking data for access checks.
462 */
463typedef struct SUPDRVOBJ
464{
465 /** Magic value (SUPDRVOBJ_MAGIC). */
466 uint32_t u32Magic;
467 /** The object type. */
468 SUPDRVOBJTYPE enmType;
469 /** Pointer to the next in the global list. */
470 struct SUPDRVOBJ * volatile pNext;
471 /** Pointer to the object destructor.
472 * This may be set to NULL if the image containing the destructor get unloaded. */
473 PFNSUPDRVDESTRUCTOR pfnDestructor;
474 /** User argument 1. */
475 void *pvUser1;
476 /** User argument 2. */
477 void *pvUser2;
478 /** The total sum of all per-session usage. */
479 uint32_t volatile cUsage;
480 /** The creator user id. */
481 RTUID CreatorUid;
482 /** The creator group id. */
483 RTGID CreatorGid;
484 /** The creator process id. */
485 RTPROCESS CreatorProcess;
486} SUPDRVOBJ, *PSUPDRVOBJ;
487
488/** Magic number for SUPDRVOBJ::u32Magic. (Dame Agatha Mary Clarissa Christie). */
489#define SUPDRVOBJ_MAGIC 0x18900915
490
491/**
492 * The per-session object usage record.
493 */
494typedef struct SUPDRVUSAGE
495{
496 /** Pointer to the next in the list. */
497 struct SUPDRVUSAGE * volatile pNext;
498 /** Pointer to the object we're recording usage for. */
499 PSUPDRVOBJ pObj;
500 /** The usage count. */
501 uint32_t volatile cUsage;
502} SUPDRVUSAGE, *PSUPDRVUSAGE;
503
504
505/**
506 * Per session data.
507 * This is mainly for memory tracking.
508 */
509typedef struct SUPDRVSESSION
510{
511 /** Pointer to the device extension. */
512 PSUPDRVDEVEXT pDevExt;
513 /** Session Cookie. */
514 uint32_t u32Cookie;
515
516 /** Load usage records. (protected by SUPDRVDEVEXT::mtxLdr) */
517 PSUPDRVLDRUSAGE volatile pLdrUsage;
518#ifdef VBOX_WITH_IDT_PATCHING
519 /** Patch usage records. (protected by SUPDRVDEVEXT::SpinLock) */
520 PSUPDRVPATCHUSAGE volatile pPatchUsage;
521#endif
522 /** The VM associated with the session. */
523 PVM pVM;
524 /** List of generic usage records. (protected by SUPDRVDEVEXT::SpinLock) */
525 PSUPDRVUSAGE volatile pUsage;
526
527 /** Spinlock protecting the bundles and the GIP members. */
528 RTSPINLOCK Spinlock;
529 /** The ring-3 mapping of the GIP (readonly). */
530 RTR0MEMOBJ GipMapObjR3;
531 /** Set if the session is using the GIP. */
532 uint32_t fGipReferenced;
533 /** Bundle of locked memory objects. */
534 SUPDRVBUNDLE Bundle;
535
536 /** The user id of the session. (Set by the OS part.) */
537 RTUID Uid;
538 /** The group id of the session. (Set by the OS part.) */
539 RTGID Gid;
540 /** The process (id) of the session. (Set by the OS part.) */
541 RTPROCESS Process;
542 /** Which process this session is associated with. */
543 RTR0PROCESS R0Process;
544#if defined(RT_OS_OS2)
545 /** The system file number of this session. */
546 uint16_t sfn;
547 uint16_t Alignment; /**< Alignment */
548#endif
549#if defined(RT_OS_DARWIN) || defined(RT_OS_OS2) || defined(RT_OS_SOLARIS)
550 /** Pointer to the next session with the same hash. */
551 PSUPDRVSESSION pNextHash;
552#endif
553} SUPDRVSESSION;
554
555
556/**
557 * Device extension.
558 */
559typedef struct SUPDRVDEVEXT
560{
561 /** Spinlock to serialize the initialization,
562 * usage counting and destruction of the IDT entry override and objects. */
563 RTSPINLOCK Spinlock;
564
565#ifdef VBOX_WITH_IDT_PATCHING
566 /** List of patches. */
567 PSUPDRVPATCH volatile pIdtPatches;
568 /** List of patches Free. */
569 PSUPDRVPATCH volatile pIdtPatchesFree;
570#endif
571
572 /** List of registered objects. Protected by the spinlock. */
573 PSUPDRVOBJ volatile pObjs;
574 /** List of free object usage records. */
575 PSUPDRVUSAGE volatile pUsageFree;
576
577 /** Global cookie. */
578 uint32_t u32Cookie;
579
580 /** The IDT entry number.
581 * Only valid if pIdtPatches is set. */
582 uint8_t volatile u8Idt;
583
584 /** Loader mutex.
585 * This protects pvVMMR0, pvVMMR0Entry, pImages and SUPDRVSESSION::pLdrUsage. */
586 RTSEMFASTMUTEX mtxLdr;
587
588 /** VMM Module 'handle'.
589 * 0 if the code VMM isn't loaded and Idt are nops. */
590 void * volatile pvVMMR0;
591 /** VMMR0EntryInt() pointer. */
592 DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryInt, (PVM pVM, unsigned uOperation, void *pvArg));
593 /** VMMR0EntryFast() pointer. */
594 DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryFast, (PVM pVM, unsigned uOperation));
595 /** VMMR0EntryEx() pointer. */
596 DECLR0CALLBACKMEMBER(int, pfnVMMR0EntryEx, (PVM pVM, unsigned uOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg));
597
598 /** Linked list of loaded code. */
599 PSUPDRVLDRIMAGE volatile pLdrImages;
600
601 /** GIP mutex.
602 * Any changes to any of the GIP members requires ownership of this mutex,
603 * except on driver init and termination. */
604 RTSEMFASTMUTEX mtxGip;
605 /** Pointer to the Global Info Page (GIP). */
606 PSUPGLOBALINFOPAGE pGip;
607 /** The physical address of the GIP. */
608 RTHCPHYS HCPhysGip;
609 /** Number of processes using the GIP.
610 * (The updates are suspend while cGipUsers is 0.)*/
611 uint32_t volatile cGipUsers;
612 /** The ring-0 memory object handle for the GIP page. */
613 RTR0MEMOBJ GipMemObj;
614 /** The GIP timer handle. */
615 PRTTIMER pGipTimer;
616 /** If non-zero we've successfully called RTTimerRequestSystemGranularity(). */
617 uint32_t u32SystemTimerGranularityGrant;
618 /** The CPU id of the GIP master.
619 * This CPU is responsible for the updating the common GIP data. */
620 RTCPUID volatile idGipMaster;
621} SUPDRVDEVEXT;
622
623
624__BEGIN_DECLS
625
626/*******************************************************************************
627* OS Specific Functions *
628*******************************************************************************/
629void VBOXCALL supdrvOSObjInitCreator(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession);
630bool VBOXCALL supdrvOSObjCanAccess(PSUPDRVOBJ pObj, PSUPDRVSESSION pSession, const char *pszObjName, int *prc);
631bool VBOXCALL supdrvOSGetForcedAsyncTscMode(PSUPDRVDEVEXT pDevExt);
632
633
634/*******************************************************************************
635* Shared Functions *
636*******************************************************************************/
637int VBOXCALL supdrvIOCtl(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPREQHDR pReqHdr);
638int VBOXCALL supdrvIOCtlFast(uintptr_t uIOCtl, PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
639int VBOXCALL supdrvInitDevExt(PSUPDRVDEVEXT pDevExt);
640void VBOXCALL supdrvDeleteDevExt(PSUPDRVDEVEXT pDevExt);
641int VBOXCALL supdrvCreateSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION *ppSession);
642void VBOXCALL supdrvCloseSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
643void VBOXCALL supdrvCleanupSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession);
644int VBOXCALL supdrvGipInit(PSUPDRVDEVEXT pDevExt, PSUPGLOBALINFOPAGE pGip, RTHCPHYS HCPhys, uint64_t u64NanoTS, unsigned uUpdateHz);
645void VBOXCALL supdrvGipTerm(PSUPGLOBALINFOPAGE pGip);
646void VBOXCALL supdrvGipUpdate(PSUPGLOBALINFOPAGE pGip, uint64_t u64NanoTS);
647void VBOXCALL supdrvGipUpdatePerCpu(PSUPGLOBALINFOPAGE pGip, uint64_t u64NanoTS, unsigned iCpu);
648bool VBOXCALL supdrvDetermineAsyncTsc(uint64_t *pu64DiffCores);
649
650__END_DECLS
651
652#endif
653
Note: See TracBrowser for help on using the repository browser.

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