1 | /* $Id: VMMR3VTable.cpp 93600 2022-02-04 08:59:13Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VM - The Virtual Machine Monitor, Ring-3 API VTable Definitions.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2022 Oracle Corporation
|
---|
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 |
|
---|
18 |
|
---|
19 | /*********************************************************************************************************************************
|
---|
20 | * Header Files *
|
---|
21 | *********************************************************************************************************************************/
|
---|
22 | #define RT_RELAXED_CALLBACKS_TYPES
|
---|
23 | #define LOG_GROUP LOG_GROUP_VMM
|
---|
24 | #include <VBox/vmm/vmmr3vtable.h>
|
---|
25 |
|
---|
26 | #include <iprt/asm.h>
|
---|
27 | #include <iprt/errcore.h>
|
---|
28 |
|
---|
29 |
|
---|
30 | /*********************************************************************************************************************************
|
---|
31 | * Internal Functions *
|
---|
32 | *********************************************************************************************************************************/
|
---|
33 | static DECLCALLBACK(int) vmmR3ReservedVTableEntry(void);
|
---|
34 |
|
---|
35 |
|
---|
36 | /*********************************************************************************************************************************
|
---|
37 | * Global Variables *
|
---|
38 | *********************************************************************************************************************************/
|
---|
39 | static const VMMR3VTABLE g_VMMR3VTable =
|
---|
40 | {
|
---|
41 | /* .uMagicVersion = */ VMMR3VTABLE_MAGIC_VERSION,
|
---|
42 | /* .fFlags = */ 0,
|
---|
43 | /* .pszDescription = */ "x86 & amd64",
|
---|
44 |
|
---|
45 | #define VTABLE_ENTRY(a_Api) a_Api,
|
---|
46 | #define VTABLE_RESERVED(a_Name) vmmR3ReservedVTableEntry,
|
---|
47 |
|
---|
48 | #include <VBox/vmm/vmmr3vtable-def.h>
|
---|
49 |
|
---|
50 | #undef VTABLE_ENTRY
|
---|
51 | #undef VTABLE_RESERVED
|
---|
52 |
|
---|
53 | /* .uMagicVersionEnd = */ VMMR3VTABLE_MAGIC_VERSION,
|
---|
54 | };
|
---|
55 |
|
---|
56 |
|
---|
57 | /**
|
---|
58 | * Reserved VMM function table entry.
|
---|
59 | */
|
---|
60 | static DECLCALLBACK(int) vmmR3ReservedVTableEntry(void)
|
---|
61 | {
|
---|
62 | void * volatile pvCaller = ASMReturnAddress();
|
---|
63 | AssertLogRel(("Reserved VMM function table entry called from %p!\n", pvCaller ));
|
---|
64 | return VERR_INTERNAL_ERROR;
|
---|
65 | }
|
---|
66 |
|
---|
67 |
|
---|
68 | VMMR3DECL(PCVMMR3VTABLE) VMMR3GetVTable(void)
|
---|
69 | {
|
---|
70 | return &g_VMMR3VTable;
|
---|
71 | }
|
---|
72 |
|
---|