VirtualBox

source: vbox/trunk/src/VBox/VMM/include/TRPMInternal.h@ 81002

Last change on this file since 81002 was 81002, checked in by vboxsync, 5 years ago

VMM: bugref:9566 TRPM enhancements and cleanup. Bumps TRPM saved-state version.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 2.4 KB
Line 
1/* $Id: TRPMInternal.h 81002 2019-09-25 09:12:34Z vboxsync $ */
2/** @file
3 * TRPM - Internal header file.
4 */
5
6/*
7 * Copyright (C) 2006-2019 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#ifndef VMM_INCLUDED_SRC_include_TRPMInternal_h
19#define VMM_INCLUDED_SRC_include_TRPMInternal_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include <VBox/cdefs.h>
25#include <VBox/types.h>
26#include <VBox/vmm/stam.h>
27#include <VBox/vmm/cpum.h>
28#include <VBox/vmm/pgm.h>
29
30RT_C_DECLS_BEGIN
31
32
33/** @defgroup grp_trpm_int Internals
34 * @ingroup grp_trpm
35 * @internal
36 * @{
37 */
38
39/**
40 * TRPM Data (part of VM)
41 *
42 * @note This used to be a big deal when we had raw-mode, now it's a dud. :-)
43 */
44typedef struct TRPM
45{
46#ifdef VBOX_WITH_STATISTICS
47 /** Statistics for interrupt handlers (allocated on the hypervisor heap) - R3
48 * pointer. */
49 R3PTRTYPE(PSTAMCOUNTER) paStatForwardedIRQR3;
50#endif
51 uint64_t u64Dummy;
52} TRPM;
53
54/** Pointer to TRPM Data. */
55typedef TRPM *PTRPM;
56
57
58/**
59 * Per CPU data for TRPM.
60 */
61typedef struct TRPMCPU
62{
63 /** Active Interrupt or trap vector number.
64 * If not UINT32_MAX this indicates that we're currently processing a
65 * interrupt, trap, fault, abort, whatever which have arrived at that
66 * vector number.
67 */
68 uint32_t uActiveVector;
69
70 /** Active trap type. */
71 TRPMEVENT enmActiveType;
72
73 /** Errorcode for the active interrupt/trap. */
74 uint32_t uActiveErrorCode;
75
76 /** Instruction length for software interrupts and software exceptions
77 * (\#BP, \#OF) */
78 uint8_t cbInstr;
79
80 /** Whether this \#DB trap is caused due to INT1/ICEBP. */
81 bool fIcebp;
82
83 /** CR2 at the time of the active exception. */
84 RTGCUINTPTR uActiveCR2;
85} TRPMCPU;
86
87/** Pointer to TRPMCPU Data. */
88typedef TRPMCPU *PTRPMCPU;
89/** Pointer to const TRPMCPU Data. */
90typedef const TRPMCPU *PCTRPMCPU;
91
92/** @} */
93
94RT_C_DECLS_END
95
96#endif /* !VMM_INCLUDED_SRC_include_TRPMInternal_h */
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