VirtualBox

source: vbox/trunk/src/VBox/VMM/include/internal/pgm.h@ 48890

最後變更 在這個檔案從48890是 47786,由 vboxsync 提交於 12 年 前

PGM: Added a new page type for the VT-x APIC access page MMIO alias instead of abusing the MMIO2 aliasing. There are important differences, we can safely access the MMIO2 page when aliased and save time doing so, while the alias created by IOMMMIOMapMMIOHCPage must not be accessed outside the VT-x execution AFAIK.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.6 KB
 
1/* $Id: pgm.h 47786 2013-08-16 08:59:32Z vboxsync $ */
2/** @file
3 * PGM - Internal VMM header file.
4 */
5
6/*
7 * Copyright (C) 2006-2011 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.alldomusa.eu.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 ___PGM_include_internal_h
19#define ___PGM_include_internal_h
20
21#include <VBox/vmm/pgm.h>
22
23/** @defgroup grp_pgm_int Internals
24 * @ingroup grp_pgm
25 * @internal
26 * @{
27 */
28
29/**
30 * Page type.
31 *
32 * @remarks This enum has to fit in a 3-bit field (see PGMPAGE::u3Type).
33 * @remarks This is used in the saved state, so changes to it requires bumping
34 * the saved state version.
35 * @todo So, convert to \#defines!
36 */
37typedef enum PGMPAGETYPE
38{
39 /** The usual invalid zero entry. */
40 PGMPAGETYPE_INVALID = 0,
41 /** RAM page. (RWX) */
42 PGMPAGETYPE_RAM,
43 /** MMIO2 page. (RWX) */
44 PGMPAGETYPE_MMIO2,
45 /** MMIO2 page aliased over an MMIO page. (RWX)
46 * See PGMHandlerPhysicalPageAlias(). */
47 PGMPAGETYPE_MMIO2_ALIAS_MMIO,
48 /** Special page aliased over an MMIO page. (RWX)
49 * See PGMHandlerPhysicalPageAliasHC(), but this is generally only used for
50 * VT-x's APIC access page at the moment. Treated as MMIO by everyone except
51 * the shadow paging code. */
52 PGMPAGETYPE_SPECIAL_ALIAS_MMIO,
53 /** Shadowed ROM. (RWX) */
54 PGMPAGETYPE_ROM_SHADOW,
55 /** ROM page. (R-X) */
56 PGMPAGETYPE_ROM,
57 /** MMIO page. (---) */
58 PGMPAGETYPE_MMIO,
59 /** End of valid entries. */
60 PGMPAGETYPE_END
61} PGMPAGETYPE;
62AssertCompile(PGMPAGETYPE_END == 8);
63
64VMMDECL(PGMPAGETYPE) PGMPhysGetPageType(PVM pVM, RTGCPHYS GCPhys);
65
66VMMDECL(int) PGMPhysGCPhys2HCPhys(PVM pVM, RTGCPHYS GCPhys, PRTHCPHYS pHCPhys);
67VMMDECL(int) PGMPhysGCPtr2HCPhys(PVMCPU pVCpu, RTGCPTR GCPtr, PRTHCPHYS pHCPhys);
68VMMDECL(int) PGMPhysGCPhys2CCPtr(PVM pVM, RTGCPHYS GCPhys, void **ppv, PPGMPAGEMAPLOCK pLock);
69VMMDECL(int) PGMPhysGCPhys2CCPtrReadOnly(PVM pVM, RTGCPHYS GCPhys, void const **ppv, PPGMPAGEMAPLOCK pLock);
70VMMDECL(int) PGMPhysGCPtr2CCPtr(PVMCPU pVCpu, RTGCPTR GCPtr, void **ppv, PPGMPAGEMAPLOCK pLock);
71VMMDECL(int) PGMPhysGCPtr2CCPtrReadOnly(PVMCPU pVCpu, RTGCPTR GCPtr, void const **ppv, PPGMPAGEMAPLOCK pLock);
72VMMR3DECL(void) PGMR3ResetNoMorePhysWritesFlag(PVM pVM);
73
74/** @} */
75#endif
76
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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