VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMR3/PGMGst.h@ 73261

Last change on this file since 73261 was 73261, checked in by vboxsync, 7 years ago

PGM: Moving guest and shadow mode Enter and Exit function to PGMAll. bugref:9044

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 2.0 KB
Line 
1/* $Id: PGMGst.h 73261 2018-07-20 11:00:53Z vboxsync $ */
2/** @file
3 * VBox - Page Manager / Monitor, Guest Paging Template.
4 */
5
6/*
7 * Copyright (C) 2006-2018 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
19/*********************************************************************************************************************************
20* Internal Functions *
21*********************************************************************************************************************************/
22RT_C_DECLS_BEGIN
23/* all */
24PGM_GST_DECL(int, Enter)(PVMCPU pVCpu, RTGCPHYS GCPhysCR3);
25PGM_GST_DECL(int, Exit)(PVMCPU pVCpu);
26PGM_GST_DECL(int, GetPage)(PVMCPU pVCpu, RTGCPTR GCPtr, uint64_t *pfFlags, PRTGCPHYS pGCPhys);
27PGM_GST_DECL(int, ModifyPage)(PVMCPU pVCpu, RTGCPTR GCPtr, size_t cb, uint64_t fFlags, uint64_t fMask);
28PGM_GST_DECL(int, GetPDE)(PVMCPU pVCpu, RTGCPTR GCPtr, PX86PDEPAE pPDE);
29
30/* r3 */
31PGM_GST_DECL(int, Relocate)(PVMCPU pVCpu, RTGCPTR offDelta);
32RT_C_DECLS_END
33
34
35/**
36 * Relocate any GC pointers related to guest mode paging.
37 *
38 * @returns VBox status code.
39 * @param pVCpu The cross context virtual CPU structure.
40 * @param offDelta The relocation offset.
41 */
42PGM_GST_DECL(int, Relocate)(PVMCPU pVCpu, RTGCPTR offDelta)
43{
44 pVCpu->pgm.s.pGst32BitPdRC += offDelta;
45
46 for (unsigned i = 0; i < RT_ELEMENTS(pVCpu->pgm.s.apGstPaePDsRC); i++)
47 {
48 pVCpu->pgm.s.apGstPaePDsRC[i] += offDelta;
49 }
50 pVCpu->pgm.s.pGstPaePdptRC += offDelta;
51
52 return VINF_SUCCESS;
53}
54
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