pgm.h revision caabf230521eba8b46a6b4368781e7e0bac81c68
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PGM - Page Monitor / Monitor.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Copyright (C) 2006-2010 Oracle Corporation
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * available from http://www.virtualbox.org. This file is free software;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * you can redistribute it and/or modify it under the terms of the GNU
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * General Public License (GPL) as published by the Free Software
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The contents of this file may alternatively be used under the terms
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * of the Common Development and Distribution License Version 1.0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VirtualBox OSE distribution, in which case the provisions of the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * CDDL are applicable instead of those of the GPL.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * You may elect to license modified versions of this file under the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * terms and conditions of either the GPL or the CDDL or both.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/vmm/gmm.h> /* for PGMMREGISTERSHAREDMODULEREQ */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/VMMDev.h> /* for VMMDEVSHAREDREGIONDESC */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_pgm The Page Monitor / Manager API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * FNPGMRELOCATE callback mode.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The callback is for checking if the suggested address is suitable. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The callback is for executing the relocation. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Callback function which will be called when PGM is trying to find
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * a new location for the mapping.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The callback is called in two modes, 1) the check mode and 2) the relocate mode.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * In 1) the callback should say if it objects to a suggested new location. If it
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * accepts the new location, it is called again for doing it's relocation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns true if the location is ok.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns false if another location should be found.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPtrOld The old virtual address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPtrNew The new virtual address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmMode Used to indicate the callback mode.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User argument.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @remark The return value is no a failure indicator, it's an acceptance
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * indicator. Relocation can not fail!
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(bool) FNPGMRELOCATE(PVM pVM, RTGCPTR GCPtrOld, RTGCPTR GCPtrNew, PGMRELOCATECALL enmMode, void *pvUser);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a relocation callback function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Physical page access handler type.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** MMIO range. Pages are not present, all access is done in interpreter or recompiler. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Handler all write access to a physical page range. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Handler all access to a physical page range. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * \#PF Handler callback for physical access handler ranges in RC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code (appropriate for RC return).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pVM VM Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uErrorCode CPU Error code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pRegFrame Trap register frame.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * NULL on DMA and other non CPU access.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvFault The fault address (cr2).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhysFault The GC physical address corresponding to pvFault.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User argument.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPGMRCPHYSHANDLER(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPHYS GCPhysFault, void *pvUser);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PGM access callback. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * \#PF Handler callback for physical access handler ranges in R0.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code (appropriate for R0 return).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pVM VM Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uErrorCode CPU Error code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pRegFrame Trap register frame.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * NULL on DMA and other non CPU access.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvFault The fault address (cr2).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhysFault The GC physical address corresponding to pvFault.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User argument.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPGMR0PHYSHANDLER(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPHYS GCPhysFault, void *pvUser);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PGM access callback. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Guest Access type
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Read access. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Write access. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * \#PF Handler callback for physical access handler ranges (MMIO among others) in HC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The handler can not raise any faults, it's mainly for monitoring write access
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to certain pages.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS if the handler have carried out the operation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_PGM_HANDLER_DO_DEFAULT if the caller should carry out the access operation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pVM VM Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys The physical address the guest is writing to.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvPhys The HC mapping of that address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvBuf What the guest is reading/writing.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbBuf How much it's reading/writing.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmAccessType The access type.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User argument.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPGMR3PHYSHANDLER(PVM pVM, RTGCPHYS GCPhys, void *pvPhys, void *pvBuf, size_t cbBuf, PGMACCESSTYPE enmAccessType, void *pvUser);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PGM access callback. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Virtual access handler type.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Write access handled. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** All access handled. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Hypervisor write access handled.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is used to catch the guest trying to write to LDT, TSS and any other
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * system structure which the brain dead intel guys let unprivilegde code find. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * \#PF Handler callback for virtual access handler ranges, RC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Important to realize that a physical page in a range can have aliases, and
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * for ALL and WRITE handlers these will also trigger.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code (appropriate for GC return).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pVM VM Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param uErrorCode CPU Error code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pRegFrame Trap register frame.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvFault The fault address (cr2).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvRange The base address of the handled virtual range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param offRange The offset of the access into this range.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * (If it's a EIP range this is the EIP, if not it's pvFault.)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPGMRCVIRTHANDLER(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PGM access callback. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * \#PF Handler callback for virtual access handler ranges, R3.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Important to realize that a physical page in a range can have aliases, and
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * for ALL and WRITE handlers these will also trigger.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_SUCCESS if the handler have carried out the operation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VINF_PGM_HANDLER_DO_DEFAULT if the caller should carry out the access operation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pVM VM Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPtr The virtual address the guest is writing to. (not correct if it's an alias!)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvPtr The HC mapping of that address.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvBuf What the guest is reading/writing.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbBuf How much it's reading/writing.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmAccessType The access type.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User argument.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPGMR3VIRTHANDLER(PVM pVM, RTGCPTR GCPtr, void *pvPtr, void *pvBuf, size_t cbBuf, PGMACCESSTYPE enmAccessType, void *pvUser);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PGM access callback. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * \#PF Handler callback for invalidation of virtual access handler ranges.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pVM VM Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPtr The virtual address the guest has changed.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPGMR3VIRTINVALIDATE(PVM pVM, RTGCPTR GCPtr);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PGM invalidation callback. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef FNPGMR3VIRTINVALIDATE *PFNPGMR3VIRTINVALIDATE;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PGMR3PhysEnumDirtyFTPages callback for syncing dirty physical pages
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pVM VM Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPhys GC physical address
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pRange HC virtual address of the page(s)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param cbRange Size of the dirty range in bytes.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser User argument.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPGMENUMDIRTYFTPAGES(PVM pVM, RTGCPHYS GCPhys, uint8_t *pRange, unsigned cbRange, void *pvUser);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PGMR3PhysEnumDirtyFTPages callback. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef FNPGMENUMDIRTYFTPAGES *PFNPGMENUMDIRTYFTPAGES;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Paging mode.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The usual invalid value. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Real mode. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Protected mode, no paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** 32-bit paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** PAE paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** PAE paging with NX enabled. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** 64-bit AMD paging (long mode). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** 64-bit AMD paging (long mode) with NX enabled. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Nested paging mode (shadow only; guest physical to host physical). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Extended paging (Intel) mode. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The max number of modes */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** 32bit hackishness. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Macro for checking if the guest is using paging.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmMode PGMMODE_*.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @remark ASSUMES certain order of the PGMMODE_* values.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PGMMODE_WITH_PAGING(enmMode) ((enmMode) >= PGMMODE_32_BIT)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Macro for checking if it's one of the long mode modes.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmMode PGMMODE_*.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PGMMODE_IS_LONG_MODE(enmMode) ((enmMode) == PGMMODE_AMD64_NX || (enmMode) == PGMMODE_AMD64)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Is the ROM mapped (true) or is the shadow RAM mapped (false).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns boolean.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmProt The PGMROMPROT value, must be valid.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(RTHCPHYS) PGMGetNestedCR3(PVMCPU pVCpu, PGMMODE enmShadowMode);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(RTHCPHYS) PGMGetInterRCCR3(PVM pVM, PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMTrap0eHandler(PVMCPU pVCpu, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPrefetchPage(PVMCPU pVCpu, RTGCPTR GCPtrPage);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMVerifyAccess(PVMCPU pVCpu, RTGCPTR Addr, uint32_t cbSize, uint32_t fAccess);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMIsValidAccess(PVMCPU pVCpu, RTGCPTR Addr, uint32_t cbSize, uint32_t fAccess);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(VBOXSTRICTRC) PGMInterpretInstruction(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMMap(PVM pVM, RTGCPTR GCPtr, RTHCPHYS HCPhys, uint32_t cbPages, unsigned fFlags);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMMapGetPage(PVM pVM, RTGCPTR GCPtr, uint64_t *pfFlags, PRTHCPHYS pHCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMMapSetPage(PVM pVM, RTGCPTR GCPtr, uint64_t cb, uint64_t fFlags);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMMapModifyPage(PVM pVM, RTGCPTR GCPtr, size_t cb, uint64_t fFlags, uint64_t fMask);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMShwGetPage(PVMCPU pVCpu, RTGCPTR GCPtr, uint64_t *pfFlags, PRTHCPHYS pHCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMShwMakePageReadonly(PVMCPU pVCpu, RTGCPTR GCPtr, uint32_t fFlags);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMShwMakePageWritable(PVMCPU pVCpu, RTGCPTR GCPtr, uint32_t fFlags);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMShwMakePageNotPresent(PVMCPU pVCpu, RTGCPTR GCPtr, uint32_t fFlags);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @name Flags for PGMShwMakePageReadonly, PGMShwMakePageWritable and
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PGMShwMakePageNotPresent
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The call is from an access handler for dealing with the a faulting write
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * operation. The virtual address is within the same page. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The page is an MMIO2. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMGstGetPage(PVMCPU pVCpu, RTGCPTR GCPtr, uint64_t *pfFlags, PRTGCPHYS pGCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(bool) PGMGstIsPagePresent(PVMCPU pVCpu, RTGCPTR GCPtr);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMGstSetPage(PVMCPU pVCpu, RTGCPTR GCPtr, size_t cb, uint64_t fFlags);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMGstModifyPage(PVMCPU pVCpu, RTGCPTR GCPtr, size_t cb, uint64_t fFlags, uint64_t fMask);
caabf230521eba8b46a6b4368781e7e0bac81c68vboxsyncVMMDECL(int) PGMGstQueryPaePDPtr(PVMCPU pVCpu, unsigned iPdpt, PX86PDPE pPdpe);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMInvalidatePage(PVMCPU pVCpu, RTGCPTR GCPtrPage);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMFlushTLB(PVMCPU pVCpu, uint64_t cr3, bool fGlobal);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMSyncCR3(PVMCPU pVCpu, uint64_t cr0, uint64_t cr3, uint64_t cr4, bool fGlobal);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMUpdateCR3(PVMCPU pVCpu, uint64_t cr3);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMChangeMode(PVMCPU pVCpu, uint64_t cr0, uint64_t cr4, uint64_t efer);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(const char *) PGMGetModeName(PGMMODE enmMode);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMM_INT_DECL(void) PGMNotifyNxeChanged(PVMCPU pVCpu, bool fNxe);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerPhysicalRegisterEx(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync R3PTRTYPE(PFNPGMR3PHYSHANDLER) pfnHandlerR3, RTR3PTR pvUserR3,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync R0PTRTYPE(PFNPGMR0PHYSHANDLER) pfnHandlerR0, RTR0PTR pvUserR0,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync RCPTRTYPE(PFNPGMRCPHYSHANDLER) pfnHandlerRC, RTRCPTR pvUserRC,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerPhysicalModify(PVM pVM, RTGCPHYS GCPhysCurrent, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerPhysicalDeregister(PVM pVM, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerPhysicalChangeCallbacks(PVM pVM, RTGCPHYS GCPhys,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync R3PTRTYPE(PFNPGMR3PHYSHANDLER) pfnHandlerR3, RTR3PTR pvUserR3,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync R0PTRTYPE(PFNPGMR0PHYSHANDLER) pfnHandlerR0, RTR0PTR pvUserR0,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync RCPTRTYPE(PFNPGMRCPHYSHANDLER) pfnHandlerRC, RTRCPTR pvUserRC,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerPhysicalSplit(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysSplit);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerPhysicalJoin(PVM pVM, RTGCPHYS GCPhys1, RTGCPHYS GCPhys2);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerPhysicalPageTempOff(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerPhysicalPageAlias(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage, RTGCPHYS GCPhysPageRemap);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerPhysicalPageAliasHC(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage, RTHCPHYS HCPhysPageRemap);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerPhysicalReset(PVM pVM, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(bool) PGMHandlerPhysicalIsRegistered(PVM pVM, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(bool) PGMHandlerVirtualIsRegistered(PVM pVM, RTGCPTR GCPtr);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(bool) PGMPhysIsGCPhysValid(PVM pVM, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(bool) PGMPhysIsGCPhysNormal(PVM pVM, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPhysGCPtr2GCPhys(PVMCPU pVCpu, RTGCPTR GCPtr, PRTGCPHYS pGCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(void) PGMPhysInvalidatePageMapTLBEntry(PVM pVM, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(void) PGMPhysReleasePageMappingLock(PVM pVM, PPGMPAGEMAPLOCK pLock);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPhysRead(PVM pVM, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPhysWrite(PVM pVM, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPhysSimpleReadGCPhys(PVM pVM, void *pvDst, RTGCPHYS GCPhysSrc, size_t cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPhysSimpleWriteGCPhys(PVM pVM, RTGCPHYS GCPhysDst, const void *pvSrc, size_t cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPhysSimpleReadGCPtr(PVMCPU pVCpu, void *pvDst, RTGCPTR GCPtrSrc, size_t cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPhysSimpleWriteGCPtr(PVMCPU pVCpu, RTGCPTR GCPtrDst, const void *pvSrc, size_t cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPhysReadGCPtr(PVMCPU pVCpu, void *pvDst, RTGCPTR GCPtrSrc, size_t cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPhysWriteGCPtr(PVMCPU pVCpu, RTGCPTR GCPtrDst, const void *pvSrc, size_t cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPhysSimpleDirtyWriteGCPtr(PVMCPU pVCpu, RTGCPTR GCPtrDst, const void *pvSrc, size_t cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPhysInterpretedRead(PVMCPU pVCpu, PCPUMCTXCORE pCtxCore, void *pvDst, RTGCPTR GCPtrSrc, size_t cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPhysInterpretedReadNoHandlers(PVMCPU pVCpu, PCPUMCTXCORE pCtxCore, void *pvDst, RTGCUINTPTR GCPtrSrc, size_t cb, bool fRaiseTrap);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMPhysInterpretedWriteNoHandlers(PVMCPU pVCpu, PCPUMCTXCORE pCtxCore, RTGCPTR GCPtrDst, void const *pvSrc, size_t cb, bool fRaiseTrap);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(unsigned) PGMAssertHandlerAndFlagsInSync(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(unsigned) PGMAssertNoMappingConflicts(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(unsigned) PGMAssertCR3(PVM pVM, PVMCPU pVCpu, uint64_t cr3, uint64_t cr4);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* VBOX_STRICT */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#if defined(IN_RC) || defined(VBOX_WITH_2X_4GB_ADDR_SPACE)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(void) PGMRZDynMapStartAutoSet(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(void) PGMRZDynMapReleaseAutoSet(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(void) PGMRZDynMapFlushAutoSet(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(uint32_t) PGMRZDynMapPushAutoSubset(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(void) PGMRZDynMapPopAutoSubset(PVMCPU pVCpu, uint32_t iPrevSubset);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(void) PGMSetLargePageUsage(PVM pVM, bool fUseLargePages);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Query large page usage state
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns 0 - disabled, 1 - enabled
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pVM The VM to operate on.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PGMIsUsingLargePages(pVM) ((pVM)->fUseLargePages)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_pgm_gc The PGM Guest Context API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @ingroup grp_pgm
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RC */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_pgm_r0 The PGM Host Context Ring-0 API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @ingroup grp_pgm
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(int) PGMR0PhysAllocateHandyPages(PVM pVM, PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(int) PGMR0PhysAllocateLargeHandyPage(PVM pVM, PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(int) PGMR0SharedModuleCheck(PVM pVM, PGVM pGVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule, uint32_t cRegions, PGMMSHAREDREGIONDESC pRegions);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(int) PGMR0Trap0eHandlerNestedPaging(PVM pVM, PVMCPU pVCpu, PGMMODE enmShwPagingMode, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPHYS pvFault);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(VBOXSTRICTRC) PGMR0Trap0eHandlerNPMisconfig(PVM pVM, PVMCPU pVCpu, PGMMODE enmShwPagingMode, PCPUMCTXCORE pRegFrame, RTGCPHYS GCPhysFault, uint32_t uErr);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(bool) PGMR0DynMapStartOrMigrateAutoSet(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(void) PGMR0DynMapMigrateAutoSet(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING0 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_pgm_r3 The PGM Host Context Ring-3 API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @ingroup grp_pgm
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(void) PGMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(void) PGMR3ResetUnpluggedCpu(PVM pVM, PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3ChangeMode(PVM pVM, PVMCPU pVCpu, PGMMODE enmGuestMode);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysRegisterRam(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, const char *pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysChangeMemBalloon(PVM pVM, bool fInflate, unsigned cPages, RTGCPHYS *paPhysPage);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysEnumDirtyFTPages(PVM pVM, PFNPGMENUMDIRTYFTPAGES pfnEnum, void *pvUser);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(uint32_t) PGMR3PhysGetRamRangeCount(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysGetRange(PVM pVM, uint32_t iRange, PRTGCPHYS pGCPhysStart, PRTGCPHYS pGCPhysLast,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3QueryVMMMemoryStats(PVM pVM, uint64_t *puTotalAllocSize, uint64_t *puTotalFreeSize, uint64_t *puTotalBalloonSize, uint64_t *puTotalSharedSize);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3QueryMemoryStats(PVM pVM, uint64_t *pulTotalMem, uint64_t *pulPrivateMem, uint64_t *puTotalSharedMem, uint64_t *puTotalZeroMem);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysMMIORegister(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync R3PTRTYPE(PFNPGMR3PHYSHANDLER) pfnHandlerR3, RTR3PTR pvUserR3,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync R0PTRTYPE(PFNPGMR0PHYSHANDLER) pfnHandlerR0, RTR0PTR pvUserR0,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync RCPTRTYPE(PFNPGMRCPHYSHANDLER) pfnHandlerRC, RTRCPTR pvUserRC,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysMMIODeregister(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysMMIO2Register(PVM pVM, PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS cb, uint32_t fFlags, void **ppv, const char *pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysMMIO2Deregister(PVM pVM, PPDMDEVINS pDevIns, uint32_t iRegion);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysMMIO2Map(PVM pVM, PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysMMIO2Unmap(PVM pVM, PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(bool) PGMR3PhysMMIO2IsBase(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysMMIO2GetHCPhys(PVM pVM, PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS off, PRTHCPHYS pHCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysMMIO2MapKernel(PVM pVM, PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS off, RTGCPHYS cb, const char *pszDesc, PRTR0PTR pR0Ptr);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @name PGMR3PhysRegisterRom flags.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Inidicates that ROM shadowing should be enabled. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Indicates that what pvBinary points to won't go away
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * and can be used for strictness checks. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PGMPHYS_ROM_FLAGS_PERMANENT_BINARY RT_BIT_32(1)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysRomRegister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPHYS cb,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const void *pvBinary, uint32_t cbBinary, uint32_t fFlags, const char *pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysRomProtect(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, PGMROMPROT enmProt);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysRegister(PVM pVM, void *pvRam, RTGCPHYS GCPhys, size_t cb, unsigned fFlags, const SUPPAGE *paPages, const char *pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(void) PGMR3PhysSetA20(PVMCPU pVCpu, bool fEnable);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @name PGMR3MapPT flags.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The mapping may be unmapped later. The default is permanent mappings. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3MapPT(PVM pVM, RTGCPTR GCPtr, uint32_t cb, uint32_t fFlags, PFNPGMRELOCATE pfnRelocate, void *pvUser, const char *pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3UnmapPT(PVM pVM, RTGCPTR GCPtr);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3MappingsSize(PVM pVM, uint32_t *pcb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3MappingsFix(PVM pVM, RTGCPTR GCPtrBase, uint32_t cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3MapIntermediate(PVM pVM, RTUINTPTR Addr, RTHCPHYS HCPhys, unsigned cbPages);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3MapRead(PVM pVM, void *pvDst, RTGCPTR GCPtrSrc, size_t cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3HandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const char *pszModR0, const char *pszHandlerR0, RTR0PTR pvUserR0,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const char *pszModRC, const char *pszHandlerRC, RTRCPTR pvUserRC, const char *pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMR3HandlerVirtualRegisterEx(PVM pVM, PGMVIRTHANDLERTYPE enmType, RTGCPTR GCPtr, RTGCPTR GCPtrLast,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3HandlerVirtualRegister(PVM pVM, PGMVIRTHANDLERTYPE enmType, RTGCPTR GCPtr, RTGCPTR GCPtrLast,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const char *pszHandlerRC, const char *pszModRC, const char *pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerVirtualChangeInvalidateCallback(PVM pVM, RTGCPTR GCPtr, R3PTRTYPE(PFNPGMR3VIRTINVALIDATE) pfnInvalidateR3);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerVirtualDeregister(PVM pVM, RTGCPTR GCPtr);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysTlbGCPhys2Ptr(PVM pVM, RTGCPHYS GCPhys, bool fWritable, void **ppv);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(uint8_t) PGMR3PhysReadU8(PVM pVM, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(uint16_t) PGMR3PhysReadU16(PVM pVM, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(uint32_t) PGMR3PhysReadU32(PVM pVM, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(uint64_t) PGMR3PhysReadU64(PVM pVM, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(void) PGMR3PhysWriteU8(PVM pVM, RTGCPHYS GCPhys, uint8_t Value);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(void) PGMR3PhysWriteU16(PVM pVM, RTGCPHYS GCPhys, uint16_t Value);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(void) PGMR3PhysWriteU32(PVM pVM, RTGCPHYS GCPhys, uint32_t Value);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(void) PGMR3PhysWriteU64(PVM pVM, RTGCPHYS GCPhys, uint64_t Value);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysReadExternal(PVM pVM, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysWriteExternal(PVM pVM, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite, const char *pszWho);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysGCPhys2CCPtrExternal(PVM pVM, RTGCPHYS GCPhys, void **ppv, PPGMPAGEMAPLOCK pLock);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysGCPhys2CCPtrReadOnlyExternal(PVM pVM, RTGCPHYS GCPhys, void const **ppv, PPGMPAGEMAPLOCK pLock);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysChunkMap(PVM pVM, uint32_t idChunk);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(void) PGMR3PhysChunkInvalidateTLB(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysAllocateHandyPages(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3PhysAllocateLargeHandyPage(PVM pVM, RTGCPHYS GCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3DbgR3Ptr2GCPhys(PVM pVM, RTR3PTR R3Ptr, PRTGCPHYS pGCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3DbgR3Ptr2HCPhys(PVM pVM, RTR3PTR R3Ptr, PRTHCPHYS pHCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3DbgHCPhys2GCPhys(PVM pVM, RTHCPHYS HCPhys, PRTGCPHYS pGCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3DbgReadGCPhys(PVM pVM, void *pvDst, RTGCPHYS GCPhysSrc, size_t cb, uint32_t fFlags, size_t *pcbRead);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3DbgWriteGCPhys(PVM pVM, RTGCPHYS GCPhysDst, const void *pvSrc, size_t cb, uint32_t fFlags, size_t *pcbWritten);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3DbgReadGCPtr(PVM pVM, void *pvDst, RTGCPTR GCPtrSrc, size_t cb, uint32_t fFlags, size_t *pcbRead);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3DbgWriteGCPtr(PVM pVM, RTGCPTR GCPtrDst, void const *pvSrc, size_t cb, uint32_t fFlags, size_t *pcbWritten);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3DbgScanPhysical(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cbRange, RTGCPHYS GCPhysAlign, const uint8_t *pabNeedle, size_t cbNeedle, PRTGCPHYS pGCPhysHit);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3DbgScanVirtual(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtr, RTGCPTR cbRange, RTGCPTR GCPtrAlign, const uint8_t *pabNeedle, size_t cbNeedle, PRTGCUINTPTR pGCPhysHit);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3_INT_DECL(int) PGMR3DumpHierarchyShw(PVM pVM, uint64_t cr3, uint32_t fFlags, uint64_t u64FirstAddr, uint64_t u64LastAddr, uint32_t cMaxDepth, PCDBGFINFOHLP pHlp);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3_INT_DECL(int) PGMR3DumpHierarchyGst(PVM pVM, uint64_t cr3, uint32_t fFlags, RTGCPTR FirstAddr, RTGCPTR LastAddr, uint32_t cMaxDepth, PCDBGFINFOHLP pHlp);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @name Page sharing
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3SharedModuleRegister(PVM pVM, VBOXOSFAMILY enmGuestOS, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule, unsigned cRegions, VMMDEVSHAREDREGIONDESC *pRegions);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3SharedModuleUnregister(PVM pVM, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3SharedModuleGetPageState(PVM pVM, RTGCPTR GCPtrPage, bool *pfShared, uint64_t *puPageFlags);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING3 */