VirtualBox

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

Last change on this file since 47786 was 47786, checked in by vboxsync, 11 years ago

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.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
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.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 ___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
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