VirtualBox

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

Last change on this file since 41318 was 38953, checked in by vboxsync, 13 years ago

PGM: Attempt at fixing the VERR_MAP_FAILED during state save problem on 32-bit hosts when assigning lots of memory to the guest. PGM should lock down guest RAM pages before use and release them afterwards like everyone else. Still quite some stuff left to do there, so I've deviced a little hack for tracking unlocked mappings and using this as input when deciding to do async or sync chunk unmapping at save/load time. See xtracker #5912 and public ticket 7929.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/* $Id: pgm.h 38953 2011-10-06 08:49:36Z vboxsync $ */
2/** @file
3 * PGM - Internal VMM header file.
4 */
5
6/*
7 * Copyright (C) 2006-2010 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 /** Shadowed ROM. (RWX) */
49 PGMPAGETYPE_ROM_SHADOW,
50 /** ROM page. (R-X) */
51 PGMPAGETYPE_ROM,
52 /** MMIO page. (---) */
53 PGMPAGETYPE_MMIO,
54 /** End of valid entries. */
55 PGMPAGETYPE_END
56} PGMPAGETYPE;
57AssertCompile(PGMPAGETYPE_END <= 7);
58
59VMMDECL(PGMPAGETYPE) PGMPhysGetPageType(PVM pVM, RTGCPHYS GCPhys);
60
61VMMDECL(int) PGMPhysGCPhys2HCPhys(PVM pVM, RTGCPHYS GCPhys, PRTHCPHYS pHCPhys);
62VMMDECL(int) PGMPhysGCPtr2HCPhys(PVMCPU pVCpu, RTGCPTR GCPtr, PRTHCPHYS pHCPhys);
63VMMDECL(int) PGMPhysGCPhys2CCPtr(PVM pVM, RTGCPHYS GCPhys, void **ppv, PPGMPAGEMAPLOCK pLock);
64VMMDECL(int) PGMPhysGCPhys2CCPtrReadOnly(PVM pVM, RTGCPHYS GCPhys, void const **ppv, PPGMPAGEMAPLOCK pLock);
65VMMDECL(int) PGMPhysGCPtr2CCPtr(PVMCPU pVCpu, RTGCPTR GCPtr, void **ppv, PPGMPAGEMAPLOCK pLock);
66VMMDECL(int) PGMPhysGCPtr2CCPtrReadOnly(PVMCPU pVCpu, RTGCPTR GCPtr, void const **ppv, PPGMPAGEMAPLOCK pLock);
67VMMR3DECL(void) PGMR3ResetNoMorePhysWritesFlag(PVM pVM);
68
69/** @} */
70#endif
71
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