VirtualBox

source: vbox/trunk/src/VBox/VMM/include/CPUMInternal-armv8.h@ 99132

Last change on this file since 99132 was 99070, checked in by vboxsync, 21 months ago

VMM/{CPUM,DBGF}: Some basic support to dump register values with DBGF for ARMv8, bugref:10393

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
Line 
1/* $Id: CPUMInternal-armv8.h 99070 2023-03-20 14:58:57Z vboxsync $ */
2/** @file
3 * CPUM - Internal header file, ARMv8 variant.
4 */
5
6/*
7 * Copyright (C) 2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
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#ifndef VMM_INCLUDED_SRC_include_CPUMInternal_armv8_h
29#define VMM_INCLUDED_SRC_include_CPUMInternal_armv8_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#ifndef VBOX_FOR_DTRACE_LIB
35# include <VBox/cdefs.h>
36# include <VBox/types.h>
37# include <VBox/vmm/stam.h>
38#else
39# pragma D depends_on library cpumctx.d
40# pragma D depends_on library cpum.d
41
42/* Some fudging. */
43typedef uint64_t STAMCOUNTER;
44#endif
45
46
47
48
49/** @defgroup grp_cpum_int Internals
50 * @ingroup grp_cpum
51 * @internal
52 * @{
53 */
54
55/** Use flags (CPUM::fUseFlags).
56 * @{ */
57/** Set to indicate that we should save host DR0-7 and load the hypervisor debug
58 * registers in the raw-mode world switchers. (See CPUMRecalcHyperDRx.) */
59#define CPUM_USE_DEBUG_REGS_HYPER RT_BIT(0)
60/** Used in ring-0 to indicate that we have loaded the hypervisor debug
61 * registers. */
62#define CPUM_USED_DEBUG_REGS_HYPER RT_BIT(1)
63/** Used in ring-0 to indicate that we have loaded the guest debug
64 * registers (DR0-3 and maybe DR6) for direct use by the guest.
65 * DR7 (and AMD-V DR6) are handled via the VMCB. */
66#define CPUM_USED_DEBUG_REGS_GUEST RT_BIT(2)
67/** @} */
68
69
70/** @name CPUM Saved State Version.
71 * @{ */
72/** The current saved state version. */
73#define CPUM_SAVED_STATE_VERSION 1
74/** @} */
75
76
77/**
78 * CPUM Data (part of VM)
79 */
80typedef struct CPUM
81{
82 /** Indicates that a state restore is pending.
83 * This is used to verify load order dependencies (PGM). */
84 bool fPendingRestore;
85 uint8_t abPadding0[7];
86
87 /** @todo */
88} CPUM;
89#ifndef VBOX_FOR_DTRACE_LIB
90/** @todo Compile time size/alignment assertions. */
91#endif
92/** Pointer to the CPUM instance data residing in the shared VM structure. */
93typedef CPUM *PCPUM;
94
95/**
96 * CPUM Data (part of VMCPU)
97 */
98typedef struct CPUMCPU
99{
100 /** Guest context.
101 * Aligned on a 64-byte boundary. */
102 CPUMCTX Guest;
103
104 /** Use flags.
105 * These flags indicates both what is to be used and what has been used. */
106 uint32_t fUseFlags;
107
108 /** Changed flags.
109 * These flags indicates to REM (and others) which important guest
110 * registers which has been changed since last time the flags were cleared.
111 * See the CPUM_CHANGED_* defines for what we keep track of.
112 *
113 * @todo Obsolete, but will probably be refactored so keep it for reference. */
114 uint32_t fChanged;
115} CPUMCPU;
116#ifndef VBOX_FOR_DTRACE_LIB
117/** @todo Compile time size/alignment assertions. */
118#endif
119/** Pointer to the CPUMCPU instance data residing in the shared VMCPU structure. */
120typedef CPUMCPU *PCPUMCPU;
121
122#ifndef VBOX_FOR_DTRACE_LIB
123RT_C_DECLS_BEGIN
124
125# ifdef IN_RING3
126DECLHIDDEN(int) cpumR3DbgInit(PVM pVM);
127# endif
128
129RT_C_DECLS_END
130#endif /* !VBOX_FOR_DTRACE_LIB */
131
132/** @} */
133
134#endif /* !VMM_INCLUDED_SRC_include_CPUMInternal_armv8_h */
135
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