0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @file
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PGM - Page Monitor / Monitor.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/*
c1d279fc0865b91a40b30eda02ed14f6533fe1a4vboxsync * Copyright (C) 2006-2015 Oracle Corporation
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
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 *
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 *
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 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifndef ___VBox_vmm_pgm_h
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define ___VBox_vmm_pgm_h
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/types.h>
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/sup.h>
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/vmm/vmapi.h>
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/vmm/gmm.h> /* for PGMMREGISTERSHAREDMODULEREQ */
2d97f8baccdd684bc0a8a15eb86bbe9ff2b85374vboxsync#include <iprt/x86.h>
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/VMMDev.h> /* for VMMDEVSHAREDREGIONDESC */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/param.h>
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncRT_C_DECLS_BEGIN
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_pgm The Page Monitor / Manager API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * FNPGMRELOCATE callback mode.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef enum PGMRELOCATECALL
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The callback is for checking if the suggested address is suitable. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMRELOCATECALL_SUGGEST = 1,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The callback is for executing the relocation. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMRELOCATECALL_RELOCATE
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} PGMRELOCATECALL;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Callback function which will be called when PGM is trying to find
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * a new location for the mapping.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
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 *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
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!
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(bool) FNPGMRELOCATE(PVM pVM, RTGCPTR GCPtrOld, RTGCPTR GCPtrNew, PGMRELOCATECALL enmMode, void *pvUser);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a relocation callback function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef FNPGMRELOCATE *PFNPGMRELOCATE;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Physical page access handler type.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef enum PGMPHYSHANDLERTYPE
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** MMIO range. Pages are not present, all access is done in interpreter or recompiler. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMPHYSHANDLERTYPE_MMIO = 1,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Handler all write access to a physical page range. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMPHYSHANDLERTYPE_PHYSICAL_WRITE,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Handler all access to a physical page range. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMPHYSHANDLERTYPE_PHYSICAL_ALL
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} PGMPHYSHANDLERTYPE;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * \#PF Handler callback for physical access handler ranges in RC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
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.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPGMRCPHYSHANDLER(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPHYS GCPhysFault, void *pvUser);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PGM access callback. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef FNPGMRCPHYSHANDLER *PFNPGMRCPHYSHANDLER;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * \#PF Handler callback for physical access handler ranges in R0.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
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.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPGMR0PHYSHANDLER(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPHYS GCPhysFault, void *pvUser);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PGM access callback. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef FNPGMR0PHYSHANDLER *PFNPGMR0PHYSHANDLER;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Guest Access type
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef enum PGMACCESSTYPE
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Read access. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMACCESSTYPE_READ = 1,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Write access. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMACCESSTYPE_WRITE
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} PGMACCESSTYPE;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * \#PF Handler callback for physical access handler ranges (MMIO among others) in HC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The handler can not raise any faults, it's mainly for monitoring write access
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to certain pages.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
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.
2afbe132eb7931e0125141eabe3a48e08f1ffab5vboxsync *
2afbe132eb7931e0125141eabe3a48e08f1ffab5vboxsync * @todo Add pVCpu, possibly replacing pVM.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
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. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef FNPGMR3PHYSHANDLER *PFNPGMR3PHYSHANDLER;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Virtual access handler type.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef enum PGMVIRTHANDLERTYPE
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Write access handled. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMVIRTHANDLERTYPE_WRITE = 1,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** All access handled. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMVIRTHANDLERTYPE_ALL,
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 PGMVIRTHANDLERTYPE_HYPERVISOR
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} PGMVIRTHANDLERTYPE;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * \#PF Handler callback for virtual access handler ranges, RC.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
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 *
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.)
2afbe132eb7931e0125141eabe3a48e08f1ffab5vboxsync * @todo Add pVCpu, possibly replacing pVM.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPGMRCVIRTHANDLER(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PGM access callback. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef FNPGMRCVIRTHANDLER *PFNPGMRCVIRTHANDLER;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * \#PF Handler callback for virtual access handler ranges, R3.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
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 *
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.
2afbe132eb7931e0125141eabe3a48e08f1ffab5vboxsync * @todo Add pVCpu, possibly replacing pVM.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
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. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef FNPGMR3VIRTHANDLER *PFNPGMR3VIRTHANDLER;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * \#PF Handler callback for invalidation of virtual access handler ranges.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pVM VM Handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param GCPtr The virtual address the guest has changed.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPGMR3VIRTINVALIDATE(PVM pVM, RTGCPTR GCPtr);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PGM invalidation callback. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef FNPGMR3VIRTINVALIDATE *PFNPGMR3VIRTINVALIDATE;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * PGMR3PhysEnumDirtyFTPages callback for syncing dirty physical pages
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
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.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(int) FNPGMENUMDIRTYFTPAGES(PVM pVM, RTGCPHYS GCPhys, uint8_t *pRange, unsigned cbRange, void *pvUser);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to PGMR3PhysEnumDirtyFTPages callback. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef FNPGMENUMDIRTYFTPAGES *PFNPGMENUMDIRTYFTPAGES;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Paging mode.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef enum PGMMODE
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The usual invalid value. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMMODE_INVALID = 0,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Real mode. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMMODE_REAL,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Protected mode, no paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMMODE_PROTECTED,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** 32-bit paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMMODE_32_BIT,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** PAE paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMMODE_PAE,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** PAE paging with NX enabled. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMMODE_PAE_NX,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** 64-bit AMD paging (long mode). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMMODE_AMD64,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** 64-bit AMD paging (long mode) with NX enabled. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMMODE_AMD64_NX,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Nested paging mode (shadow only; guest physical to host physical). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMMODE_NESTED,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Extended paging (Intel) mode. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMMODE_EPT,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The max number of modes */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMMODE_MAX,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** 32bit hackishness. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PGMMODE_32BIT_HACK = 0x7fffffff
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} PGMMODE;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Macro for checking if the guest is using paging.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmMode PGMMODE_*.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @remark ASSUMES certain order of the PGMMODE_* values.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PGMMODE_WITH_PAGING(enmMode) ((enmMode) >= PGMMODE_32_BIT)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Macro for checking if it's one of the long mode modes.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmMode PGMMODE_*.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PGMMODE_IS_LONG_MODE(enmMode) ((enmMode) == PGMMODE_AMD64_NX || (enmMode) == PGMMODE_AMD64)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Is the ROM mapped (true) or is the shadow RAM mapped (false).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns boolean.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param enmProt The PGMROMPROT value, must be valid.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PGMROMPROT_IS_ROM(enmProt) \
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync ( (enmProt) == PGMROMPROT_READ_ROM_WRITE_IGNORE \
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync || (enmProt) == PGMROMPROT_READ_ROM_WRITE_RAM )
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(bool) PGMIsLockOwner(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMRegisterStringFormatTypes(void);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(void) PGMDeregisterStringFormatTypes(void);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(RTHCPHYS) PGMGetHyperCR3(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(RTHCPHYS) PGMGetNestedCR3(PVMCPU pVCpu, PGMMODE enmShadowMode);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(RTHCPHYS) PGMGetInterHCCR3(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(RTHCPHYS) PGMGetInterRCCR3(PVM pVM, PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(RTHCPHYS) PGMGetInter32BitCR3(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(RTHCPHYS) PGMGetInterPaeCR3(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(RTHCPHYS) PGMGetInterAmd64CR3(PVM pVM);
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);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifndef IN_RING0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(bool) PGMMapHasConflicts(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifdef VBOX_STRICT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(void) PGMMapCheck(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif
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 * @{ */
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#define PGM_MK_PG_IS_WRITE_FAULT RT_BIT(0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The page is an MMIO2. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PGM_MK_PG_IS_MMIO2 RT_BIT(1)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @}*/
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);
fa79e346ae60eee8b82eb6c5da64ab2c3a76b5f7vboxsyncVMM_INT_DECL(int) PGMGstGetPaePdpes(PVMCPU pVCpu, PX86PDPE paPdpes);
45983ad0361cdc6b336c585eaf2ebd59f8d93cdavboxsyncVMM_INT_DECL(void) PGMGstUpdatePaePdpes(PVMCPU pVCpu, PCX86PDPE paPdpes);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
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);
79e2d7467e99c4b22f9c70a4fc16e22b74d709davboxsyncVMMDECL(void) PGMCr0WpEnabled(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(PGMMODE) PGMGetGuestMode(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(PGMMODE) PGMGetShadowMode(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(PGMMODE) PGMGetHostMode(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(const char *) PGMGetModeName(PGMMODE enmMode);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMM_INT_DECL(void) PGMNotifyNxeChanged(PVMCPU pVCpu, bool fNxe);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(bool) PGMHasDirtyPages(PVM pVM);
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,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync R3PTRTYPE(const char *) pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerPhysicalModify(PVM pVM, RTGCPHYS GCPhysCurrent, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMDECL(int) PGMHandlerPhysicalDeregister(PVM pVM, RTGCPHYS GCPhys);
f045189a81a321668f511d62a57e764431a79db1vboxsyncVMMDECL(int) PGMHandlerPhysicalChangeUserArgs(PVM pVM, RTGCPHYS GCPhys, RTR3PTR pvUserR3, RTR0PTR pvUserR0, 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) PGMPhysIsA20Enabled(PVMCPU pVCpu);
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) 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);
5a90a14c4fc648773dd5ddab4bf308aa01480e4dvboxsyncVMM_INT_DECL(int) PGMPhysIemGCPhys2Ptr(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys, bool fWritable, bool fByPassHandlers, void **ppv, PPGMPAGEMAPLOCK pLock);
d2e0179389eb0030b21e5d4dab434fcccd4af754vboxsyncVMM_INT_DECL(int) PGMPhysIemQueryAccess(PVM pVM, RTGCPHYS GCPhys, bool fWritable, bool fByPassHandlers);
d2e0179389eb0030b21e5d4dab434fcccd4af754vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifdef VBOX_STRICT
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
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);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
addc480d0d7650db6323467bbdab6c21836a2928vboxsyncVMMDECL(int) PGMSetLargePageUsage(PVM pVM, bool fUseLargePages);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Query large page usage state
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns 0 - disabled, 1 - enabled
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pVM The VM to operate on.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PGMIsUsingLargePages(pVM) ((pVM)->fUseLargePages)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifdef IN_RC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_pgm_gc The PGM Guest Context API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMRCDECL(int) PGMRCDynMapInit(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @} */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RC */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifdef IN_RING0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_pgm_r0 The PGM Host Context Ring-0 API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
4f007e159d64d64366398032617896c3a982fa42vboxsyncVMMR0_INT_DECL(int) PGMR0PhysAllocateHandyPages(PVM pVM, PVMCPU pVCpu);
4f007e159d64d64366398032617896c3a982fa42vboxsyncVMMR0_INT_DECL(int) PGMR0PhysFlushHandyPages(PVM pVM, PVMCPU pVCpu);
4f007e159d64d64366398032617896c3a982fa42vboxsyncVMMR0_INT_DECL(int) PGMR0PhysAllocateLargeHandyPage(PVM pVM, PVMCPU pVCpu);
e2bd93b4f9c38c9b01eb960ba7bc1fc9c4d38ce8vboxsyncVMMR0_INT_DECL(int) PGMR0PhysSetupIommu(PVM pVM);
5f4259f329a2073f6644399b6922077adca01529vboxsyncVMMR0DECL(int) PGMR0SharedModuleCheck(PVM pVM, PGVM pGVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule, PCRTGCPTR64 paRegionsGCPtrs);
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);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(int) PGMR0DynMapInit(void);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(void) PGMR0DynMapTerm(void);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(int) PGMR0DynMapInitVM(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(void) PGMR0DynMapTermVM(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(int) PGMR0DynMapAssertIntegrity(void);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(bool) PGMR0DynMapStartOrMigrateAutoSet(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR0DECL(void) PGMR0DynMapMigrateAutoSet(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# endif
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @} */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING0 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifdef IN_RING3
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_pgm_r3 The PGM Host Context Ring-3 API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3Init(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3InitDynMap(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3InitFinalize(PVM pVM);
ca265ea9be4883ffaa0f3e859321984270a4abd6vboxsyncVMMR3_INT_DECL(int) PGMR3InitCompleted(PVM pVM, VMINITCOMPLETED enmWhat);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(void) PGMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
5e70bf3a580e6e3154a170d2d3ece7b609d64065vboxsyncVMMR3DECL(void) PGMR3ResetCpu(PVM pVM, PVMCPU pVCpu);
1823a2b6757096c699825898c33f8d93089a1b4bvboxsyncVMMR3_INT_DECL(void) PGMR3Reset(PVM pVM);
1823a2b6757096c699825898c33f8d93089a1b4bvboxsyncVMMR3_INT_DECL(void) PGMR3MemSetup(PVM pVM, bool fReset);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3Term(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3LockCall(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3ChangeMode(PVM pVM, PVMCPU pVCpu, PGMMODE enmGuestMode);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
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) PGMR3PhysWriteProtectRAM(PVM pVM);
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,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync const char **ppszDesc, bool *pfIsMmio);
a04100f955c08c93b063cf3d9c4f963637996f3cvboxsyncVMMR3DECL(int) PGMR3QueryMemoryStats(PUVM pUVM, uint64_t *pcbTotalMem, uint64_t *pcbPrivateMem, uint64_t *pcbSharedMem, uint64_t *pcbZeroMem);
a04100f955c08c93b063cf3d9c4f963637996f3cvboxsyncVMMR3DECL(int) PGMR3QueryGlobalMemoryStats(PUVM pUVM, uint64_t *pcbAllocMem, uint64_t *pcbFreeMem, uint64_t *pcbBallonedMem, uint64_t *pcbSharedMem);
1999ae03c34840fa4d712fd2e020120b2cb7182avboxsync
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,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync R3PTRTYPE(const char *) pszDesc);
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
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @name PGMR3PhysRegisterRom flags.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @{ */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Inidicates that ROM shadowing should be enabled. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PGMPHYS_ROM_FLAGS_SHADOWED RT_BIT_32(0)
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)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @} */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
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 * @{ */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The mapping may be unmapped later. The default is permanent mappings. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define PGMR3MAPPT_FLAGS_UNMAPPABLE RT_BIT(0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @} */
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) PGMR3FinalizeMappings(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3MappingsSize(PVM pVM, uint32_t *pcb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3MappingsFix(PVM pVM, RTGCPTR GCPtrBase, uint32_t cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3MappingsUnfix(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(bool) PGMR3MappingsNeedReFixing(PVM pVM);
1bc500a8f68a50c718620e24d730ac17b56d4d26vboxsync#if defined(VBOX_WITH_RAW_MODE) || (HC_ARCH_BITS != 64 && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL))
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3MapIntermediate(PVM pVM, RTUINTPTR Addr, RTHCPHYS HCPhys, unsigned cbPages);
6eb31fb6807f232a26608ef513afc9529dec40a4vboxsync#endif
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3MapRead(PVM pVM, void *pvDst, RTGCPTR GCPtrSrc, size_t cb);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3HandlerPhysicalRegister(PVM pVM, PGMPHYSHANDLERTYPE enmType, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNPGMR3PHYSHANDLER pfnHandlerR3, void *pvUserR3,
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,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync R3PTRTYPE(PFNPGMR3VIRTINVALIDATE) pfnInvalidateR3,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync R3PTRTYPE(PFNPGMR3VIRTHANDLER) pfnHandlerR3,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync RCPTRTYPE(PFNPGMRCVIRTHANDLER) pfnHandlerRC,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync R3PTRTYPE(const char *) pszDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3HandlerVirtualRegister(PVM pVM, PGMVIRTHANDLERTYPE enmType, RTGCPTR GCPtr, RTGCPTR GCPtrLast,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNPGMR3VIRTINVALIDATE pfnInvalidateR3,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync PFNPGMR3VIRTHANDLER pfnHandlerR3,
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) PGMR3PoolGrow(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
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);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3CheckIntegrity(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
98427c0ab08697e468c26dc33ee9571308577867vboxsyncVMMR3DECL(int) PGMR3DbgR3Ptr2GCPhys(PUVM pUVM, RTR3PTR R3Ptr, PRTGCPHYS pGCPhys);
98427c0ab08697e468c26dc33ee9571308577867vboxsyncVMMR3DECL(int) PGMR3DbgR3Ptr2HCPhys(PUVM pUVM, RTR3PTR R3Ptr, PRTHCPHYS pHCPhys);
98427c0ab08697e468c26dc33ee9571308577867vboxsyncVMMR3DECL(int) PGMR3DbgHCPhys2GCPhys(PUVM pUVM, RTHCPHYS HCPhys, PRTGCPHYS pGCPhys);
98427c0ab08697e468c26dc33ee9571308577867vboxsyncVMMR3_INT_DECL(int) PGMR3DbgReadGCPhys(PVM pVM, void *pvDst, RTGCPHYS GCPhysSrc, size_t cb, uint32_t fFlags, size_t *pcbRead);
98427c0ab08697e468c26dc33ee9571308577867vboxsyncVMMR3_INT_DECL(int) PGMR3DbgWriteGCPhys(PVM pVM, RTGCPHYS GCPhysDst, const void *pvSrc, size_t cb, uint32_t fFlags, size_t *pcbWritten);
98427c0ab08697e468c26dc33ee9571308577867vboxsyncVMMR3_INT_DECL(int) PGMR3DbgReadGCPtr(PVM pVM, void *pvDst, RTGCPTR GCPtrSrc, size_t cb, uint32_t fFlags, size_t *pcbRead);
98427c0ab08697e468c26dc33ee9571308577867vboxsyncVMMR3_INT_DECL(int) PGMR3DbgWriteGCPtr(PVM pVM, RTGCPTR GCPtrDst, void const *pvSrc, size_t cb, uint32_t fFlags, size_t *pcbWritten);
98427c0ab08697e468c26dc33ee9571308577867vboxsyncVMMR3_INT_DECL(int) PGMR3DbgScanPhysical(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cbRange, RTGCPHYS GCPhysAlign, const uint8_t *pabNeedle, size_t cbNeedle, PRTGCPHYS pGCPhysHit);
98427c0ab08697e468c26dc33ee9571308577867vboxsyncVMMR3_INT_DECL(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
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @name Page sharing
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @{ */
5f4259f329a2073f6644399b6922077adca01529vboxsyncVMMR3DECL(int) PGMR3SharedModuleRegister(PVM pVM, VBOXOSFAMILY enmGuestOS, char *pszModuleName, char *pszVersion,
5f4259f329a2073f6644399b6922077adca01529vboxsync RTGCPTR GCBaseAddr, uint32_t cbModule,
5f4259f329a2073f6644399b6922077adca01529vboxsync uint32_t cRegions, VMMDEVSHAREDREGIONDESC const *paRegions);
5f4259f329a2073f6644399b6922077adca01529vboxsyncVMMR3DECL(int) PGMR3SharedModuleUnregister(PVM pVM, char *pszModuleName, char *pszVersion,
5f4259f329a2073f6644399b6922077adca01529vboxsync RTGCPTR GCBaseAddr, uint32_t cbModule);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) PGMR3SharedModuleCheckAll(PVM pVM);
4e47bb772df0d04d1ded3e06354de547d52e2d06vboxsyncVMMR3DECL(int) PGMR3SharedModuleGetPageState(PVM pVM, RTGCPTR GCPtrPage, bool *pfShared, uint64_t *pfPageFlags);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @} */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @} */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING3 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncRT_C_DECLS_END
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @} */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync