VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMR3/VMMR3VTable.cpp

Last change on this file was 109186, checked in by vboxsync, 4 days ago

VMM: Defined VMMR3VTABLE_F_TARGET_X86 & VMMR3VTABLE_F_TARGET_ARMV8 and associated mask for use with the VMMR3VTABLE::fFlags field.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/* $Id: VMMR3VTable.cpp 109186 2025-05-06 21:28:13Z vboxsync $ */
2/** @file
3 * VM - The Virtual Machine Monitor, Ring-3 API VTable Definitions.
4 */
5
6/*
7 * Copyright (C) 2022-2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.215389.xyz.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28
29/*********************************************************************************************************************************
30* Header Files *
31*********************************************************************************************************************************/
32#define RT_RELAXED_CALLBACKS_TYPES
33#define LOG_GROUP LOG_GROUP_VMM
34#include <VBox/vmm/vmmr3vtable.h>
35
36#include <iprt/asm.h>
37#include <iprt/errcore.h>
38
39
40/*********************************************************************************************************************************
41* Internal Functions *
42*********************************************************************************************************************************/
43static DECLCALLBACK(int) vmmR3ReservedVTableEntry(void);
44
45
46/*********************************************************************************************************************************
47* Global Variables *
48*********************************************************************************************************************************/
49static const VMMR3VTABLE g_VMMR3VTable =
50{
51 /* .uMagicVersion = */ VMMR3VTABLE_MAGIC_VERSION,
52#ifdef VBOX_VMM_TARGET_X86
53 /* .fFlags = */ VMMR3VTABLE_F_TARGET_X86,
54 /* .pszDescription = */ "x86 & amd64",
55#elif defined(VBOX_VMM_TARGET_ARMV8)
56 /* .fFlags = */ VMMR3VTABLE_F_TARGET_ARMV8,
57 /* .pszDescription = */ "armv8",
58#else
59# error "port me"
60#endif
61
62#define VTABLE_ENTRY(a_Api) a_Api,
63#define VTABLE_RESERVED(a_Name) vmmR3ReservedVTableEntry,
64
65#include <VBox/vmm/vmmr3vtable-def.h>
66
67#undef VTABLE_ENTRY
68#undef VTABLE_RESERVED
69
70 /* .uMagicVersionEnd = */ VMMR3VTABLE_MAGIC_VERSION,
71};
72
73
74/**
75 * Reserved VMM function table entry.
76 */
77static DECLCALLBACK(int) vmmR3ReservedVTableEntry(void)
78{
79 void * volatile pvCaller = ASMReturnAddress();
80 AssertLogRelMsgFailed(("Reserved VMM function table entry called from %p!\n", pvCaller ));
81 return VERR_INTERNAL_ERROR;
82}
83
84
85#ifndef VBOX_WITH_DEBUGGER
86/** Stub */
87DBGDECL(int) DBGCCreate(PUVM pUVM, PCDBGCIO pIo, unsigned fFlags)
88{
89 RT_NOREF(pUVM, pIo, fFlags);
90 return VERR_NOT_IMPLEMENTED;
91}
92#endif
93
94
95VMMR3DECL(PCVMMR3VTABLE) VMMR3GetVTable(void)
96{
97 return &g_VMMR3VTable;
98}
99
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