VirtualBox

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

Last change on this file since 26600 was 26150, checked in by vboxsync, 15 years ago

PGM: Split out the inlined code from PGMInternal.h and into PGMInline.h so we can drop all the &pVM->pgm.s and &pVCpu->pgm.s stuff.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1/* $Id: PGMGC.cpp 26150 2010-02-02 15:52:54Z 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#include "../PGMInline.h"
38
39#include <iprt/asm.h>
40#include <iprt/assert.h>
41#include <VBox/log.h>
42#include <VBox/param.h>
43#include <VBox/err.h>
44#include <VBox/dis.h>
45#include <VBox/disopcode.h>
46
47
48
49/*******************************************************************************
50* Internal Functions *
51*******************************************************************************/
52
53
54
55#ifndef RT_ARCH_AMD64
56/*
57 * Shadow - 32-bit mode
58 */
59#define PGM_SHW_TYPE PGM_TYPE_32BIT
60#define PGM_SHW_NAME(name) PGM_SHW_NAME_32BIT(name)
61#include "PGMGCShw.h"
62
63/* Guest - real mode */
64#define PGM_GST_TYPE PGM_TYPE_REAL
65#define PGM_GST_NAME(name) PGM_GST_NAME_REAL(name)
66#define PGM_BTH_NAME(name) PGM_BTH_NAME_32BIT_REAL(name)
67#include "PGMGCGst.h"
68#include "PGMGCBth.h"
69#undef PGM_BTH_NAME
70#undef PGM_GST_TYPE
71#undef PGM_GST_NAME
72
73/* Guest - protected mode */
74#define PGM_GST_TYPE PGM_TYPE_PROT
75#define PGM_GST_NAME(name) PGM_GST_NAME_PROT(name)
76#define PGM_BTH_NAME(name) PGM_BTH_NAME_32BIT_PROT(name)
77#include "PGMGCGst.h"
78#include "PGMGCBth.h"
79#undef PGM_BTH_NAME
80#undef PGM_GST_TYPE
81#undef PGM_GST_NAME
82
83/* Guest - 32-bit mode */
84#define PGM_GST_TYPE PGM_TYPE_32BIT
85#define PGM_GST_NAME(name) PGM_GST_NAME_32BIT(name)
86#define PGM_BTH_NAME(name) PGM_BTH_NAME_32BIT_32BIT(name)
87#include "PGMGCGst.h"
88#include "PGMGCBth.h"
89#undef PGM_BTH_NAME
90#undef PGM_GST_TYPE
91#undef PGM_GST_NAME
92
93#undef PGM_SHW_TYPE
94#undef PGM_SHW_NAME
95#endif /* !RT_ARCH_AMD64 */
96
97
98/*
99 * Shadow - PAE mode
100 */
101#define PGM_SHW_TYPE PGM_TYPE_PAE
102#define PGM_SHW_NAME(name) PGM_SHW_NAME_PAE(name)
103#define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_REAL(name)
104#include "PGMGCShw.h"
105
106/* Guest - real mode */
107#define PGM_GST_TYPE PGM_TYPE_REAL
108#define PGM_GST_NAME(name) PGM_GST_NAME_REAL(name)
109#define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_REAL(name)
110#include "PGMGCBth.h"
111#undef PGM_BTH_NAME
112#undef PGM_GST_TYPE
113#undef PGM_GST_NAME
114
115/* Guest - protected mode */
116#define PGM_GST_TYPE PGM_TYPE_PROT
117#define PGM_GST_NAME(name) PGM_GST_NAME_PROT(name)
118#define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_PROT(name)
119#include "PGMGCBth.h"
120#undef PGM_BTH_NAME
121#undef PGM_GST_TYPE
122#undef PGM_GST_NAME
123
124/* Guest - 32-bit mode */
125#define PGM_GST_TYPE PGM_TYPE_32BIT
126#define PGM_GST_NAME(name) PGM_GST_NAME_32BIT(name)
127#define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_32BIT(name)
128#include "PGMGCBth.h"
129#undef PGM_BTH_NAME
130#undef PGM_GST_TYPE
131#undef PGM_GST_NAME
132
133/* Guest - PAE mode */
134#define PGM_GST_TYPE PGM_TYPE_PAE
135#define PGM_GST_NAME(name) PGM_GST_NAME_PAE(name)
136#define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_PAE(name)
137#include "PGMGCGst.h"
138#include "PGMGCBth.h"
139#undef PGM_BTH_NAME
140#undef PGM_GST_TYPE
141#undef PGM_GST_NAME
142
143#undef PGM_SHW_TYPE
144#undef PGM_SHW_NAME
145
146
147/*
148 * Shadow - AMD64 mode
149 */
150#define PGM_SHW_TYPE PGM_TYPE_AMD64
151#define PGM_SHW_NAME(name) PGM_SHW_NAME_AMD64(name)
152#include "PGMGCShw.h"
153
154#ifdef VBOX_WITH_64_BITS_GUESTS
155/* Guest - AMD64 mode */
156#define PGM_GST_TYPE PGM_TYPE_AMD64
157#define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name)
158#define PGM_BTH_NAME(name) PGM_BTH_NAME_AMD64_AMD64(name)
159#include "PGMGCGst.h"
160#include "PGMGCBth.h"
161#undef PGM_BTH_NAME
162#undef PGM_GST_TYPE
163#undef PGM_GST_NAME
164#endif
165
166#undef PGM_SHW_TYPE
167#undef PGM_SHW_NAME
168
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