VirtualBox

source: vbox/trunk/include/VBox/vmm/nem.h@ 70977

最後變更 在這個檔案從70977是 70977,由 vboxsync 提交於 7 年 前

NEM: Working on PGM notifications. bugref:9044

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.6 KB
 
1/** @file
2 * NEM - The Native Execution Manager.
3 */
4
5/*
6 * Copyright (C) 2018 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.alldomusa.eu.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef ___VBox_vmm_nem_h
27#define ___VBox_vmm_nem_h
28
29#include <VBox/types.h>
30#include <VBox/vmm/vmapi.h>
31#include <VBox/vmm/pgm.h>
32
33
34RT_C_DECLS_BEGIN
35
36/** @defgroup grp_nem The Native Execution Manager API
37 * @ingroup grp_vmm
38 * @{
39 */
40
41/** @defgroup grp_nem_r3 The NEM ring-3 Context API
42 * @{
43 */
44VMMR3_INT_DECL(int) NEMR3InitConfig(PVM pVM);
45VMMR3_INT_DECL(int) NEMR3Init(PVM pVM, bool fFallback, bool fForced);
46VMMR3_INT_DECL(int) NEMR3InitAfterCPUM(PVM pVM);
47#ifdef IN_RING3
48VMMR3_INT_DECL(int) NEMR3InitCompleted(PVM pVM, VMINITCOMPLETED enmWhat);
49#endif
50VMMR3_INT_DECL(int) NEMR3Term(PVM pVM);
51VMMR3_INT_DECL(void) NEMR3Reset(PVM pVM);
52VMMR3_INT_DECL(void) NEMR3ResetCpu(PVMCPU pVCpu);
53
54VMMR3_INT_DECL(int) NEMR3NotifyPhysRamRegister(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb);
55VMMR3_INT_DECL(int) NEMR3NotifyPhysMmioExMap(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, uint32_t fFlags, void *pvMmio2);
56VMMR3_INT_DECL(int) NEMR3NotifyPhysMmioExUnmap(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, uint32_t fFlags);
57/** @name Flags for NEMR3NotifyPhysMmioExMap and NEMR3NotifyPhysMmioExUnmap.
58 * @{ */
59/** Set if it's MMIO2 being mapped or unmapped. */
60#define NEM_NOTIFY_PHYS_MMIO_EX_F_MMIO2 RT_BIT(0)
61/** Set if the range is replacing RAM rather that unused space. */
62#define NEM_NOTIFY_PHYS_MMIO_EX_F_REPLACE RT_BIT(1)
63/** @} */
64
65VMMR3_INT_DECL(int) NEMR3NotifyPhysRomRegisterEarly(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, uint32_t fFlags);
66VMMR3_INT_DECL(int) NEMR3NotifyPhysRomRegisterLate(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, uint32_t fFlags);
67/** @name Flags for NEMR3NotifyPhysRomRegisterEarly and NEMR3NotifyPhysRomRegisterLate.
68 * @{ */
69/** Set if the range is replacing RAM rather that unused space. */
70#define NEM_NOTIFY_PHYS_ROM_F_REPLACE RT_BIT(1)
71/** Set if it's MMIO2 being mapped or unmapped. */
72#define NEM_NOTIFY_PHYS_ROM_F_SHADOW RT_BIT(2)
73/** @} */
74
75VMMR3_INT_DECL(void) NEMR3NotifySetA20(PVMCPU pVCpu, bool fEnabled);
76/** @} */
77
78/** @defgroup grp_nem_hc The NEM host context API
79 * @{
80 */
81VMM_INT_DECL(void) NEMHCNotifyHandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb);
82VMM_INT_DECL(void) NEMHCNotifyHandlerPhysicalDeregister(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhys, RTGCPHYS cb,
83 int fRestoreAsRAM, bool fRestoreAsRAM2);
84VMM_INT_DECL(void) NEMHCNotifyHandlerPhysicalModify(PVM pVM, PGMPHYSHANDLERKIND enmKind, RTGCPHYS GCPhysOld,
85 RTGCPHYS GCPhysNew, RTGCPHYS cb, bool fRestoreAsRAM);
86
87VMM_INT_DECL(int) NEMHCNotifyPhysPageAllocated(PVM pVM, RTGCPHYS GCPhys, RTHCPHYS HCPhys, uint32_t fPageProt,
88 PGMPAGETYPE enmType, uint8_t *pu2State);
89VMM_INT_DECL(void) NEMHCNotifyPhysPageProtChanged(PVM pVM, RTGCPHYS GCPhys, RTHCPHYS HCPhys, uint32_t fPageProt,
90 PGMPAGETYPE enmType, uint8_t *pu2State);
91VMM_INT_DECL(void) NEMHCNotifyPhysPageChanged(PVM pVM, RTGCPHYS GCPhys, RTHCPHYS HCPhysPrev, RTHCPHYS HCPhysNew,
92 uint32_t fPageProt, PGMPAGETYPE enmType, uint8_t *pu2State);
93/** @name NEM_PAGE_PROT_XXX - Page protection
94 * @{ */
95#define NEM_PAGE_PROT_NONE UINT32_C(0) /**< All access causes VM exits. */
96#define NEM_PAGE_PROT_READ RT_BIT(0) /**< Read access. */
97#define NEM_PAGE_PROT_EXECUTE RT_BIT(1) /**< Execute access. */
98#define NEM_PAGE_PROT_WRITE RT_BIT(2) /**< write access. */
99/** @} */
100
101/** @} */
102
103/** @} */
104RT_C_DECLS_END
105
106
107#endif
108
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette