VirtualBox

source: vbox/trunk/src/VBox/VMM/include/SVMInternal.h@ 100859

Last change on this file since 100859 was 98103, checked in by vboxsync, 2 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: SVMInternal.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * SVM - Internal header file for the SVM code.
4 */
5
6/*
7 * Copyright (C) 2022-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_SVMInternal_h
29#define VMM_INCLUDED_SRC_include_SVMInternal_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/** @name SVM transient.
35 *
36 * A state structure for holding miscellaneous information across AMD-V
37 * VMRUN/\#VMEXIT operation, restored after the transition.
38 *
39 * @{ */
40typedef struct SVMTRANSIENT
41{
42 /** The host's rflags/eflags. */
43 RTCCUINTREG fEFlags;
44 /** The \#VMEXIT exit code (the EXITCODE field in the VMCB). */
45 uint64_t u64ExitCode;
46
47 /** The guest's TPR value used for TPR shadowing. */
48 uint8_t u8GuestTpr;
49 /** Alignment. */
50 uint8_t abAlignment0[7];
51
52 /** Pointer to the currently executing VMCB. */
53 PSVMVMCB pVmcb;
54
55 /** Whether we are currently executing a nested-guest. */
56 bool fIsNestedGuest;
57 /** Whether the guest debug state was active at the time of \#VMEXIT. */
58 bool fWasGuestDebugStateActive;
59 /** Whether the hyper debug state was active at the time of \#VMEXIT. */
60 bool fWasHyperDebugStateActive;
61 /** Whether the TSC offset mode needs to be updated. */
62 bool fUpdateTscOffsetting;
63 /** Whether the TSC_AUX MSR needs restoring on \#VMEXIT. */
64 bool fRestoreTscAuxMsr;
65 /** Whether the \#VMEXIT was caused by a page-fault during delivery of a
66 * contributary exception or a page-fault. */
67 bool fVectoringDoublePF;
68 /** Whether the \#VMEXIT was caused by a page-fault during delivery of an
69 * external interrupt or NMI. */
70 bool fVectoringPF;
71 /** Padding. */
72 bool afPadding0;
73} SVMTRANSIENT;
74/** Pointer to SVM transient state. */
75typedef SVMTRANSIENT *PSVMTRANSIENT;
76/** Pointer to a const SVM transient state. */
77typedef const SVMTRANSIENT *PCSVMTRANSIENT;
78
79AssertCompileSizeAlignment(SVMTRANSIENT, sizeof(uint64_t));
80AssertCompileMemberAlignment(SVMTRANSIENT, u64ExitCode, sizeof(uint64_t));
81AssertCompileMemberAlignment(SVMTRANSIENT, pVmcb, sizeof(uint64_t));
82/** @} */
83
84RT_C_DECLS_BEGIN
85/* Nothing for now. */
86RT_C_DECLS_END
87
88#endif /* !VMM_INCLUDED_SRC_include_SVMInternal_h */
89
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