VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMGC/PGMGC.cpp@ 20543

Last change on this file since 20543 was 13235, checked in by vboxsync, 16 years ago

PGM: Merged PGMGCInvalidatePage into PGMInvalidatePage nad fixed the callers of it to handle the return codes correctly. other cleanup.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.7 KB
Line 
1/* $Id: PGMGC.cpp 13235 2008-10-13 20:48:53Z vboxsync $ */
2/** @file
3 * PGM - Page Monitor, Guest Context.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
20 */
21
22
23/*******************************************************************************
24* Header Files *
25*******************************************************************************/
26#define LOG_GROUP LOG_GROUP_PGM
27#include <VBox/pgm.h>
28#include <VBox/cpum.h>
29#include <VBox/mm.h>
30#include <VBox/em.h>
31#include <VBox/selm.h>
32#include <VBox/iom.h>
33#include <VBox/trpm.h>
34#include <VBox/rem.h>
35#include "PGMInternal.h"
36#include <VBox/vm.h>
37
38#include <iprt/asm.h>
39#include <iprt/assert.h>
40#include <VBox/log.h>
41#include <VBox/param.h>
42#include <VBox/err.h>
43#include <VBox/dis.h>
44#include <VBox/disopcode.h>
45
46
47
48/*******************************************************************************
49* Internal Functions *
50*******************************************************************************/
51
52
53
54#ifndef RT_ARCH_AMD64
55/*
56 * Shadow - 32-bit mode
57 */
58#define PGM_SHW_TYPE PGM_TYPE_32BIT
59#define PGM_SHW_NAME(name) PGM_SHW_NAME_32BIT(name)
60#include "PGMGCShw.h"
61
62/* Guest - real mode */
63#define PGM_GST_TYPE PGM_TYPE_REAL
64#define PGM_GST_NAME(name) PGM_GST_NAME_REAL(name)
65#define PGM_BTH_NAME(name) PGM_BTH_NAME_32BIT_REAL(name)
66#include "PGMGCGst.h"
67#include "PGMGCBth.h"
68#undef PGM_BTH_NAME
69#undef PGM_GST_TYPE
70#undef PGM_GST_NAME
71
72/* Guest - protected mode */
73#define PGM_GST_TYPE PGM_TYPE_PROT
74#define PGM_GST_NAME(name) PGM_GST_NAME_PROT(name)
75#define PGM_BTH_NAME(name) PGM_BTH_NAME_32BIT_PROT(name)
76#include "PGMGCGst.h"
77#include "PGMGCBth.h"
78#undef PGM_BTH_NAME
79#undef PGM_GST_TYPE
80#undef PGM_GST_NAME
81
82/* Guest - 32-bit mode */
83#define PGM_GST_TYPE PGM_TYPE_32BIT
84#define PGM_GST_NAME(name) PGM_GST_NAME_32BIT(name)
85#define PGM_BTH_NAME(name) PGM_BTH_NAME_32BIT_32BIT(name)
86#include "PGMGCGst.h"
87#include "PGMGCBth.h"
88#undef PGM_BTH_NAME
89#undef PGM_GST_TYPE
90#undef PGM_GST_NAME
91
92#undef PGM_SHW_TYPE
93#undef PGM_SHW_NAME
94#endif /* !RT_ARCH_AMD64 */
95
96
97/*
98 * Shadow - PAE mode
99 */
100#define PGM_SHW_TYPE PGM_TYPE_PAE
101#define PGM_SHW_NAME(name) PGM_SHW_NAME_PAE(name)
102#define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_REAL(name)
103#include "PGMGCShw.h"
104
105/* Guest - real mode */
106#define PGM_GST_TYPE PGM_TYPE_REAL
107#define PGM_GST_NAME(name) PGM_GST_NAME_REAL(name)
108#define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_REAL(name)
109#include "PGMGCBth.h"
110#undef PGM_BTH_NAME
111#undef PGM_GST_TYPE
112#undef PGM_GST_NAME
113
114/* Guest - protected mode */
115#define PGM_GST_TYPE PGM_TYPE_PROT
116#define PGM_GST_NAME(name) PGM_GST_NAME_PROT(name)
117#define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_PROT(name)
118#include "PGMGCBth.h"
119#undef PGM_BTH_NAME
120#undef PGM_GST_TYPE
121#undef PGM_GST_NAME
122
123/* Guest - 32-bit mode */
124#define PGM_GST_TYPE PGM_TYPE_32BIT
125#define PGM_GST_NAME(name) PGM_GST_NAME_32BIT(name)
126#define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_32BIT(name)
127#include "PGMGCBth.h"
128#undef PGM_BTH_NAME
129#undef PGM_GST_TYPE
130#undef PGM_GST_NAME
131
132/* Guest - PAE mode */
133#define PGM_GST_TYPE PGM_TYPE_PAE
134#define PGM_GST_NAME(name) PGM_GST_NAME_PAE(name)
135#define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_PAE(name)
136#include "PGMGCGst.h"
137#include "PGMGCBth.h"
138#undef PGM_BTH_NAME
139#undef PGM_GST_TYPE
140#undef PGM_GST_NAME
141
142#undef PGM_SHW_TYPE
143#undef PGM_SHW_NAME
144
145
146/*
147 * Shadow - AMD64 mode
148 */
149#define PGM_SHW_TYPE PGM_TYPE_AMD64
150#define PGM_SHW_NAME(name) PGM_SHW_NAME_AMD64(name)
151#include "PGMGCShw.h"
152
153#ifdef VBOX_WITH_64_BITS_GUESTS
154/* Guest - AMD64 mode */
155#define PGM_GST_TYPE PGM_TYPE_AMD64
156#define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name)
157#define PGM_BTH_NAME(name) PGM_BTH_NAME_AMD64_AMD64(name)
158#include "PGMGCGst.h"
159#include "PGMGCBth.h"
160#undef PGM_BTH_NAME
161#undef PGM_GST_TYPE
162#undef PGM_GST_NAME
163#endif
164
165#undef PGM_SHW_TYPE
166#undef PGM_SHW_NAME
167
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