1 | /* $Id: NEMInternal.h 70918 2018-02-08 16:11:47Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * NEM - Internal header file.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2018 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 ___NEMInternal_h
|
---|
19 | #define ___NEMInternal_h
|
---|
20 |
|
---|
21 | #include <VBox/cdefs.h>
|
---|
22 | #include <VBox/types.h>
|
---|
23 | #include <VBox/vmm/nem.h>
|
---|
24 | #include <VBox/vmm/stam.h>
|
---|
25 | #include <VBox/vmm/vmapi.h>
|
---|
26 |
|
---|
27 | RT_C_DECLS_BEGIN
|
---|
28 |
|
---|
29 |
|
---|
30 | /** @defgroup grp_nem_int Internal
|
---|
31 | * @ingroup grp_nem
|
---|
32 | * @internal
|
---|
33 | * @{
|
---|
34 | */
|
---|
35 |
|
---|
36 | /**
|
---|
37 | * NEM VM Instance data.
|
---|
38 | */
|
---|
39 | typedef struct NEM
|
---|
40 | {
|
---|
41 | /** NEM_MAGIC. */
|
---|
42 | uint32_t u32Magic;
|
---|
43 |
|
---|
44 | /** Set if enabled. */
|
---|
45 | bool fEnabled;
|
---|
46 |
|
---|
47 | } NEM;
|
---|
48 | /** Pointer to NEM VM instance data. */
|
---|
49 | typedef NEM *PNEM;
|
---|
50 |
|
---|
51 | /** NEM::u32Magic value. */
|
---|
52 | #define NEM_MAGIC UINT32_C(0x004d454e)
|
---|
53 | /** NEM::u32Magic value after termination. */
|
---|
54 | #define NEM_MAGIC_DEAD UINT32_C(0xdead1111)
|
---|
55 |
|
---|
56 |
|
---|
57 | /**
|
---|
58 | * NEM VMCPU Instance data.
|
---|
59 | */
|
---|
60 | typedef struct NEMCPU
|
---|
61 | {
|
---|
62 | /** NEMCPU_MAGIC. */
|
---|
63 | uint32_t u32Magic;
|
---|
64 |
|
---|
65 | } NEMCPU;
|
---|
66 | /** Pointer to NEM VMCPU instance data. */
|
---|
67 | typedef NEMCPU *PNEMCPU;
|
---|
68 |
|
---|
69 | /** NEMCPU::u32Magic value. */
|
---|
70 | #define NEMCPU_MAGIC UINT32_C(0x4d454e20)
|
---|
71 | /** NEMCPU::u32Magic value after termination. */
|
---|
72 | #define NEMCPU_MAGIC_DEAD UINT32_C(0xdead2222)
|
---|
73 |
|
---|
74 | #ifdef IN_RING3
|
---|
75 | int nemR3NativeInit(PVM pVM, bool fFallback, bool fForced);
|
---|
76 | int nemR3NativeInitCompleted(PVM pVM, VMINITCOMPLETED enmWhat);
|
---|
77 | int nemR3NativeTerm(PVM pVM);
|
---|
78 | void nemR3NativeReset(PVM pVM);
|
---|
79 | void nemR3NativeResetCpu(PVMCPU pVCpu);
|
---|
80 | #endif
|
---|
81 |
|
---|
82 |
|
---|
83 | /** @} */
|
---|
84 |
|
---|
85 | RT_C_DECLS_END
|
---|
86 |
|
---|
87 | #endif
|
---|
88 |
|
---|