VirtualBox

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

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

Some more IDC code.

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