/* $Id: PGMGC.cpp 13235 2008-10-13 20:48:53Z vboxsync $ */ /** @file * PGM - Page Monitor, Guest Context. */ /* * Copyright (C) 2006-2007 Sun Microsystems, Inc. * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; * you can redistribute it and/or modify it under the terms of the GNU * General Public License (GPL) as published by the Free Software * Foundation, in version 2 as it comes in the "COPYING" file of the * VirtualBox OSE distribution. VirtualBox OSE is distributed in the * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa * Clara, CA 95054 USA or visit http://www.sun.com if you need * additional information or have any questions. */ /******************************************************************************* * Header Files * *******************************************************************************/ #define LOG_GROUP LOG_GROUP_PGM #include #include #include #include #include #include #include #include #include "PGMInternal.h" #include #include #include #include #include #include #include #include /******************************************************************************* * Internal Functions * *******************************************************************************/ #ifndef RT_ARCH_AMD64 /* * Shadow - 32-bit mode */ #define PGM_SHW_TYPE PGM_TYPE_32BIT #define PGM_SHW_NAME(name) PGM_SHW_NAME_32BIT(name) #include "PGMGCShw.h" /* Guest - real mode */ #define PGM_GST_TYPE PGM_TYPE_REAL #define PGM_GST_NAME(name) PGM_GST_NAME_REAL(name) #define PGM_BTH_NAME(name) PGM_BTH_NAME_32BIT_REAL(name) #include "PGMGCGst.h" #include "PGMGCBth.h" #undef PGM_BTH_NAME #undef PGM_GST_TYPE #undef PGM_GST_NAME /* Guest - protected mode */ #define PGM_GST_TYPE PGM_TYPE_PROT #define PGM_GST_NAME(name) PGM_GST_NAME_PROT(name) #define PGM_BTH_NAME(name) PGM_BTH_NAME_32BIT_PROT(name) #include "PGMGCGst.h" #include "PGMGCBth.h" #undef PGM_BTH_NAME #undef PGM_GST_TYPE #undef PGM_GST_NAME /* Guest - 32-bit mode */ #define PGM_GST_TYPE PGM_TYPE_32BIT #define PGM_GST_NAME(name) PGM_GST_NAME_32BIT(name) #define PGM_BTH_NAME(name) PGM_BTH_NAME_32BIT_32BIT(name) #include "PGMGCGst.h" #include "PGMGCBth.h" #undef PGM_BTH_NAME #undef PGM_GST_TYPE #undef PGM_GST_NAME #undef PGM_SHW_TYPE #undef PGM_SHW_NAME #endif /* !RT_ARCH_AMD64 */ /* * Shadow - PAE mode */ #define PGM_SHW_TYPE PGM_TYPE_PAE #define PGM_SHW_NAME(name) PGM_SHW_NAME_PAE(name) #define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_REAL(name) #include "PGMGCShw.h" /* Guest - real mode */ #define PGM_GST_TYPE PGM_TYPE_REAL #define PGM_GST_NAME(name) PGM_GST_NAME_REAL(name) #define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_REAL(name) #include "PGMGCBth.h" #undef PGM_BTH_NAME #undef PGM_GST_TYPE #undef PGM_GST_NAME /* Guest - protected mode */ #define PGM_GST_TYPE PGM_TYPE_PROT #define PGM_GST_NAME(name) PGM_GST_NAME_PROT(name) #define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_PROT(name) #include "PGMGCBth.h" #undef PGM_BTH_NAME #undef PGM_GST_TYPE #undef PGM_GST_NAME /* Guest - 32-bit mode */ #define PGM_GST_TYPE PGM_TYPE_32BIT #define PGM_GST_NAME(name) PGM_GST_NAME_32BIT(name) #define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_32BIT(name) #include "PGMGCBth.h" #undef PGM_BTH_NAME #undef PGM_GST_TYPE #undef PGM_GST_NAME /* Guest - PAE mode */ #define PGM_GST_TYPE PGM_TYPE_PAE #define PGM_GST_NAME(name) PGM_GST_NAME_PAE(name) #define PGM_BTH_NAME(name) PGM_BTH_NAME_PAE_PAE(name) #include "PGMGCGst.h" #include "PGMGCBth.h" #undef PGM_BTH_NAME #undef PGM_GST_TYPE #undef PGM_GST_NAME #undef PGM_SHW_TYPE #undef PGM_SHW_NAME /* * Shadow - AMD64 mode */ #define PGM_SHW_TYPE PGM_TYPE_AMD64 #define PGM_SHW_NAME(name) PGM_SHW_NAME_AMD64(name) #include "PGMGCShw.h" #ifdef VBOX_WITH_64_BITS_GUESTS /* Guest - AMD64 mode */ #define PGM_GST_TYPE PGM_TYPE_AMD64 #define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name) #define PGM_BTH_NAME(name) PGM_BTH_NAME_AMD64_AMD64(name) #include "PGMGCGst.h" #include "PGMGCBth.h" #undef PGM_BTH_NAME #undef PGM_GST_TYPE #undef PGM_GST_NAME #endif #undef PGM_SHW_TYPE #undef PGM_SHW_NAME