gmm.h revision e095310efd245e6d6dac0e28d920a4c82aa9888a
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @file
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * GMM - The Global Memory Manager. (VMM)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/*
cce0c6096dee0c5353bb74431dc47b05f87a1c6dvboxsync * Copyright (C) 2007 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_gmm_h
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define ___VBox_gmm_h
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/types.h>
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/gvmm.h>
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/sup.h>
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/VMMDev.h> /* for VMMDEVSHAREDREGIONDESC */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <iprt/avl.h>
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncRT_C_DECLS_BEGIN
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_gmm GMM - The Global Memory Manager
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def IN_GMM_R0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Used to indicate whether we're inside the same link module as the ring 0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * part of the Global Memory Manager or not.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifdef DOXYGEN_RUNNING
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define IN_GMM_R0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def GMMR0DECL
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Ring 0 GMM export or import declaration.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param type The return type of the function declaration.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifdef IN_GMM_R0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define GMMR0DECL(type) DECLEXPORT(type) VBOXCALL
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#else
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define GMMR0DECL(type) DECLIMPORT(type) VBOXCALL
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def IN_GMM_R3
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Used to indicate whether we're inside the same link module as the ring 3
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * part of the Global Memory Manager or not.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifdef DOXYGEN_RUNNING
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define IN_GMM_R3
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def GMMR3DECL
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Ring 3 GMM export or import declaration.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param type The return type of the function declaration.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifdef IN_GMM_R3
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define GMMR3DECL(type) DECLEXPORT(type) VBOXCALL
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#else
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define GMMR3DECL(type) DECLIMPORT(type) VBOXCALL
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The chunk shift. (2^21 = 2 MB) */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define GMM_CHUNK_SHIFT 21
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The allocation chunk size. */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync#define GMM_CHUNK_SIZE (1U << GMM_CHUNK_SHIFT)
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync/** The allocation chunk size in pages. */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync#define GMM_CHUNK_NUM_PAGES (1U << (GMM_CHUNK_SHIFT - PAGE_SHIFT))
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync/** The shift factor for converting a page id into a chunk id. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define GMM_CHUNKID_SHIFT (GMM_CHUNK_SHIFT - PAGE_SHIFT)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The last valid Chunk ID value. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define GMM_CHUNKID_LAST (GMM_PAGEID_LAST >> GMM_CHUNKID_SHIFT)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The last valid Page ID value.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The current limit is 2^28 - 1, or almost 1TB if you like.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The constraints are currently dictated by PGMPAGE. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define GMM_PAGEID_LAST (RT_BIT_32(28) - 1)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Mask out the page index from the Page ID. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define GMM_PAGEID_IDX_MASK ((1U << GMM_CHUNKID_SHIFT) - 1)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The NIL Chunk ID value. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define NIL_GMM_CHUNKID 0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The NIL Page ID value. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define NIL_GMM_PAGEID 0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#if 0 /* wrong - these are guest page pfns and not page ids! */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Special Page ID used by unassigned pages. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define GMM_PAGEID_UNASSIGNED 0x0fffffffU
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Special Page ID used by unsharable pages.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Like MMIO2, shadow and heap. This is for later, obviously. */
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync#define GMM_PAGEID_UNSHARABLE 0x0ffffffeU
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync/** The end of the valid Page IDs. This is the first special one. */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync#define GMM_PAGEID_END 0x0ffffff0U
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync#endif
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @def GMM_GCPHYS_LAST
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The last of the valid guest physical address as it applies to GMM pages.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This must reflect the constraints imposed by the RTGCPHYS type and
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * the guest page frame number used internally in GMMPAGE.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @note Note this corresponds to GMM_PAGE_PFN_LAST. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#if HC_ARCH_BITS == 64
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define GMM_GCPHYS_LAST UINT64_C(0x00000fffffff0000) /* 2^44 (16TB) - 0x10000 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#else
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define GMM_GCPHYS_LAST UINT64_C(0x0000000fffff0000) /* 2^36 (64GB) - 0x10000 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Over-commitment policy.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef enum GMMOCPOLICY
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync /** The usual invalid 0 value. */
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync GMMOCPOLICY_INVALID = 0,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** No over-commitment, fully backed.
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * The GMM guarantees that it will be able to allocate all of the
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync * guest RAM for a VM with OC policy. */
fb9af443dbf06990f4956d683286ddce29c4dca6vboxsync GMMOCPOLICY_NO_OC,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** to-be-determined. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMOCPOLICY_TBD,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The end of the valid policy range. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMOCPOLICY_END,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The usual 32-bit hack. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMOCPOLICY_32BIT_HACK = 0x7fffffff
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMOCPOLICY;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync/**
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * VM / Memory priority.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef enum GMMPRIORITY
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The usual invalid 0 value. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMPRIORITY_INVALID = 0,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** High.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * When ballooning, ask these VMs last.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * When running out of memory, try not to interrupt these VMs. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMPRIORITY_HIGH,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Normal.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * When ballooning, don't wait to ask these.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * When running out of memory, pause, save and/or kill these VMs. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMPRIORITY_NORMAL,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Low.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * When ballooning, maximize these first.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * When running out of memory, save or kill these VMs. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMPRIORITY_LOW,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The end of the valid priority range. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMPRIORITY_END,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The custom 32-bit type blowup. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMPRIORITY_32BIT_HACK = 0x7fffffff
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMPRIORITY;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * GMM Memory Accounts.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef enum GMMACCOUNT
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The customary invalid zero entry. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMACCOUNT_INVALID = 0,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Account with the base allocations. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMACCOUNT_BASE,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Account with the shadow allocations. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMACCOUNT_SHADOW,
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync /** Account with the fixed allocations. */
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync GMMACCOUNT_FIXED,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The end of the valid values. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMACCOUNT_END,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The usual 32-bit value to finish it off. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMACCOUNT_32BIT_HACK = 0x7fffffff
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMACCOUNT;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Balloon actions.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef enum
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Invalid zero entry. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMBALLOONACTION_INVALID = 0,
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync /** Inflate the balloon. */
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync GMMBALLOONACTION_INFLATE,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Deflate the balloon. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMBALLOONACTION_DEFLATE,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Puncture the balloon because of VM reset. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMBALLOONACTION_RESET,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** End of the valid actions. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMBALLOONACTION_END,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** hack forcing the size of the enum to 32-bits. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMBALLOONACTION_MAKE_32BIT_HACK = 0x7fffffff
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMBALLOONACTION;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * A page descriptor for use when freeing pages.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * See GMMR0FreePages, GMMR0BalloonedPages.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMFREEPAGEDESC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The Page ID of the page to be freed. */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync uint32_t idPage;
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync} GMMFREEPAGEDESC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a page descriptor for freeing pages. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMFREEPAGEDESC *PGMMFREEPAGEDESC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * A page descriptor for use when updating and allocating pages.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is a bit complicated because we want to do as much as possible
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * with the same structure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMPAGEDESC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The physical address of the page.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @input GMMR0AllocateHandyPages expects the guest physical address
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * to update the GMMPAGE structure with. Pass GMM_GCPHYS_UNSHAREABLE
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * when appropriate and NIL_RTHCPHYS when the page wasn't used
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * for any specific guest address.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * GMMR0AllocatePage expects the guest physical address to put in
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * the GMMPAGE structure for the page it allocates for this entry.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Pass NIL_RTHCPHYS and GMM_GCPHYS_UNSHAREABLE as above.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @output The host physical address of the allocated page.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * NIL_RTHCPHYS on allocation failure.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * ASSUMES: sizeof(RTHCPHYS) >= sizeof(RTGCPHYS).
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync RTHCPHYS HCPhysGCPhys;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The Page ID.
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync *
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * @intput GMMR0AllocateHandyPages expects the Page ID of the page to
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * update here. NIL_GMM_PAGEID means no page should be updated.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * GMMR0AllocatePages requires this to be initialized to
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * NIL_GMM_PAGEID currently.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @output The ID of the page, NIL_GMM_PAGEID if the allocation failed.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t idPage;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The Page ID of the shared page was replaced by this page.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @input GMMR0AllocateHandyPages expects this to indicate a shared
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * page that has been replaced by this page and should have its
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * reference counter decremented and perhaps be freed up. Use
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * NIL_GMM_PAGEID if no shared page was involved.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * All other APIs expects NIL_GMM_PAGEID here.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @output All APIs sets this to NIL_GMM_PAGEID.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t idSharedPage;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMPAGEDESC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncAssertCompileSize(GMMPAGEDESC, 16);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a page allocation. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMPAGEDESC *PGMMPAGEDESC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** GMMPAGEDESC::HCPhysGCPhys value that indicates that the page is unsharable.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @note This corresponds to GMM_PAGE_PFN_UNSHAREABLE. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#if HC_ARCH_BITS == 64
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define GMM_GCPHYS_UNSHAREABLE UINT64_C(0x00000fffffff1000)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#else
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define GMM_GCPHYS_UNSHAREABLE UINT64_C(0x0000000fffff1000)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0Init(void);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(void) GMMR0Term(void);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(void) GMMR0InitPerVMData(PGVM pGVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(void) GMMR0CleanupVM(PGVM pGVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0InitialReservation(PVM pVM, VMCPUID idCpu, uint64_t cBasePages, uint32_t cShadowPages, uint32_t cFixedPages,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMOCPOLICY enmPolicy, GMMPRIORITY enmPriority);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0UpdateReservation(PVM pVM, VMCPUID idCpu, uint64_t cBasePages, uint32_t cShadowPages, uint32_t cFixedPages);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0AllocateHandyPages(PVM pVM, VMCPUID idCpu, uint32_t cPagesToUpdate, uint32_t cPagesToAlloc, PGMMPAGEDESC paPages);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0AllocatePages(PVM pVM, VMCPUID idCpu, uint32_t cPages, PGMMPAGEDESC paPages, GMMACCOUNT enmAccount);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0AllocateLargePage(PVM pVM, VMCPUID idCpu, uint32_t cbPage, uint32_t *pIdPage, RTHCPHYS *pHCPhys);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0FreePages(PVM pVM, VMCPUID idCpu, uint32_t cPages, PGMMFREEPAGEDESC paPages, GMMACCOUNT enmAccount);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0FreeLargePage(PVM pVM, VMCPUID idCpu, uint32_t idPage);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0BalloonedPages(PVM pVM, VMCPUID idCpu, GMMBALLOONACTION enmAction, uint32_t cBalloonedPages);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0MapUnmapChunk(PVM pVM, VMCPUID idCpu, uint32_t idChunkMap, uint32_t idChunkUnmap, PRTR3PTR ppvR3);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0SeedChunk(PVM pVM, VMCPUID idCpu, RTR3PTR pvR3);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0RegisterSharedModule(PVM pVM, VMCPUID idCpu, VBOXOSFAMILY enmGuestOS, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule, unsigned cRegions, VMMDEVSHAREDREGIONDESC *pRegions);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0UnregisterSharedModule(PVM pVM, VMCPUID idCpu, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0UnregisterAllSharedModules(PVM pVM, VMCPUID idCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0CheckSharedModules(PVM pVM, VMCPUID idCpu);
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsyncGMMR0DECL(int) GMMR0ResetSharedModules(PVM pVM, VMCPUID idCpu);
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Request buffer for GMMR0InitialReservationReq / VMMR0_DO_GMM_INITIAL_RESERVATION.
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync * @see GMMR0InitialReservation
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMINITIALRESERVATIONREQ
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync{
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync /** The header. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync SUPVMMR0REQHDR Hdr;
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync uint64_t cBasePages; /**< @see GMMR0InitialReservation */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync uint32_t cShadowPages; /**< @see GMMR0InitialReservation */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t cFixedPages; /**< @see GMMR0InitialReservation */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync GMMOCPOLICY enmPolicy; /**< @see GMMR0InitialReservation */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync GMMPRIORITY enmPriority; /**< @see GMMR0InitialReservation */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMINITIALRESERVATIONREQ;
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync/** Pointer to a GMMR0InitialReservationReq / VMMR0_DO_GMM_INITIAL_RESERVATION request buffer. */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsynctypedef GMMINITIALRESERVATIONREQ *PGMMINITIALRESERVATIONREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsyncGMMR0DECL(int) GMMR0InitialReservationReq(PVM pVM, VMCPUID idCpu, PGMMINITIALRESERVATIONREQ pReq);
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync/**
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync * Request buffer for GMMR0UpdateReservationReq / VMMR0_DO_GMM_UPDATE_RESERVATION.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @see GMMR0UpdateReservation
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsynctypedef struct GMMUPDATERESERVATIONREQ
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync /** The header. */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync SUPVMMR0REQHDR Hdr;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint64_t cBasePages; /**< @see GMMR0UpdateReservation */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync uint32_t cShadowPages; /**< @see GMMR0UpdateReservation */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync uint32_t cFixedPages; /**< @see GMMR0UpdateReservation */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMUPDATERESERVATIONREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a GMMR0InitialReservationReq / VMMR0_DO_GMM_INITIAL_RESERVATION request buffer. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMUPDATERESERVATIONREQ *PGMMUPDATERESERVATIONREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0UpdateReservationReq(PVM pVM, VMCPUID idCpu, PGMMUPDATERESERVATIONREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Request buffer for GMMR0AllocatePagesReq / VMMR0_DO_GMM_ALLOCATE_PAGES.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @see GMMR0AllocatePages.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMALLOCATEPAGESREQ
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The header. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync SUPVMMR0REQHDR Hdr;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The account to charge the allocation to. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMACCOUNT enmAccount;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The number of pages to allocate. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t cPages;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Array of page descriptors. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMPAGEDESC aPages[1];
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMALLOCATEPAGESREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a GMMR0AllocatePagesReq / VMMR0_DO_GMM_ALLOCATE_PAGES request buffer. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMALLOCATEPAGESREQ *PGMMALLOCATEPAGESREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0AllocatePagesReq(PVM pVM, VMCPUID idCpu, PGMMALLOCATEPAGESREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Request buffer for GMMR0FreePagesReq / VMMR0_DO_GMM_FREE_PAGES.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @see GMMR0FreePages.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMFREEPAGESREQ
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The header. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync SUPVMMR0REQHDR Hdr;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The account this relates to. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMACCOUNT enmAccount;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The number of pages to free. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t cPages;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Array of free page descriptors. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMFREEPAGEDESC aPages[1];
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMFREEPAGESREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a GMMR0FreePagesReq / VMMR0_DO_GMM_FREE_PAGES request buffer. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMFREEPAGESREQ *PGMMFREEPAGESREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0FreePagesReq(PVM pVM, VMCPUID idCpu, PGMMFREEPAGESREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Request buffer for GMMR0BalloonedPagesReq / VMMR0_DO_GMM_BALLOONED_PAGES.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @see GMMR0BalloonedPages.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMBALLOONEDPAGESREQ
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The header. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync SUPVMMR0REQHDR Hdr;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The number of ballooned pages. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t cBalloonedPages;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Inflate or deflate the balloon. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMBALLOONACTION enmAction;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMBALLOONEDPAGESREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a GMMR0BalloonedPagesReq / VMMR0_DO_GMM_BALLOONED_PAGES request buffer. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMBALLOONEDPAGESREQ *PGMMBALLOONEDPAGESREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0BalloonedPagesReq(PVM pVM, VMCPUID idCpu, PGMMBALLOONEDPAGESREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Request buffer for GMMR0QueryHypervisorMemoryStatsReq / VMMR0_DO_GMM_QUERY_VMM_MEM_STATS.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @see GMMR0QueryHypervisorMemoryStatsReq.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMMEMSTATSREQ
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The header. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync SUPVMMR0REQHDR Hdr;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The number of allocated pages (out). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint64_t cAllocPages;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The number of free pages (out). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint64_t cFreePages;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The number of ballooned pages (out). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint64_t cBalloonedPages;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Maximum nr of pages (out). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint64_t cMaxPages;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMMEMSTATSREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a GMMR0QueryHypervisorMemoryStatsReq / VMMR0_DO_GMM_QUERY_HYPERVISOR_MEM_STATS request buffer. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMMEMSTATSREQ *PGMMMEMSTATSREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0QueryHypervisorMemoryStatsReq(PVM pVM, PGMMMEMSTATSREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0QueryMemoryStatsReq(PVM pVM, VMCPUID idCpu, PGMMMEMSTATSREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Request buffer for GMMR0MapUnmapChunkReq / VMMR0_DO_GMM_MAP_UNMAP_CHUNK.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @see GMMR0MapUnmapChunk
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMMAPUNMAPCHUNKREQ
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The header. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync SUPVMMR0REQHDR Hdr;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The chunk to map, NIL_GMM_CHUNKID if unmap only. (IN) */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t idChunkMap;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The chunk to unmap, NIL_GMM_CHUNKID if map only. (IN) */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t idChunkUnmap;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Where the mapping address is returned. (OUT) */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync RTR3PTR pvR3;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMMAPUNMAPCHUNKREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a GMMR0MapUnmapChunkReq / VMMR0_DO_GMM_MAP_UNMAP_CHUNK request buffer. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMMAPUNMAPCHUNKREQ *PGMMMAPUNMAPCHUNKREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0MapUnmapChunkReq(PVM pVM, VMCPUID idCpu, PGMMMAPUNMAPCHUNKREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Request buffer for GMMR0FreeLargePageReq / VMMR0_DO_GMM_FREE_LARGE_PAGE.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @see GMMR0FreeLargePage.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMFREELARGEPAGEREQ
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The header. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync SUPVMMR0REQHDR Hdr;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The Page ID. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t idPage;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMFREELARGEPAGEREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a GMMR0FreePagesReq / VMMR0_DO_GMM_FREE_PAGES request buffer. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMFREELARGEPAGEREQ *PGMMFREELARGEPAGEREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0FreeLargePageReq(PVM pVM, VMCPUID idCpu, PGMMFREELARGEPAGEREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Maximum length of the shared module name string. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define GMM_SHARED_MODULE_MAX_NAME_STRING 128
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Maximum length of the shared module version string. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define GMM_SHARED_MODULE_MAX_VERSION_STRING 16
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Request buffer for GMMR0RegisterSharedModuleReq / VMMR0_DO_GMM_REGISTER_SHARED_MODULE.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @see GMMR0RegisterSharedModule.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMREGISTERSHAREDMODULEREQ
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The header. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync SUPVMMR0REQHDR Hdr;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Shared module size. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t cbModule;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Number of included region descriptors */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t cRegions;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Base address of the shared module. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync RTGCPTR64 GCBaseAddr;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Guest OS type. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync VBOXOSFAMILY enmGuestOS;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Alignment. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t u32Alignment;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Module name */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync char szName[GMM_SHARED_MODULE_MAX_NAME_STRING];
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Module version */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync char szVersion[GMM_SHARED_MODULE_MAX_VERSION_STRING];
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Shared region descriptor(s). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync VMMDEVSHAREDREGIONDESC aRegions[1];
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMREGISTERSHAREDMODULEREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a GMMR0RegisterSharedModuleReq / VMMR0_DO_GMM_REGISTER_SHARED_MODULE request buffer. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMREGISTERSHAREDMODULEREQ *PGMMREGISTERSHAREDMODULEREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0RegisterSharedModuleReq(PVM pVM, VMCPUID idCpu, PGMMREGISTERSHAREDMODULEREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Shared region descriptor
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMSHAREDREGIONDESC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Region base address. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync RTGCPTR64 GCRegionAddr;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Region size. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t cbRegion;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Alignment. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t u32Alignment;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Pointer to physical page id array. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t *paHCPhysPageID;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMSHAREDREGIONDESC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a GMMSHAREDREGIONDESC. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMSHAREDREGIONDESC *PGMMSHAREDREGIONDESC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Shared module registration info (global)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMSHAREDMODULE
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /* Tree node. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync AVLGCPTRNODECORE Core;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Shared module size. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t cbModule;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Number of included region descriptors */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t cRegions;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Number of users (VMs). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t cUsers;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Guest OS family type. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync VBOXOSFAMILY enmGuestOS;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Module name */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync char szName[GMM_SHARED_MODULE_MAX_NAME_STRING];
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Module version */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync char szVersion[GMM_SHARED_MODULE_MAX_VERSION_STRING];
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Shared region descriptor(s). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMSHAREDREGIONDESC aRegions[1];
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMSHAREDMODULE;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a GMMSHAREDMODULE. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMSHAREDMODULE *PGMMSHAREDMODULE;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Page descriptor for GMMR0SharedModuleCheckRange
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMSHAREDPAGEDESC
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** HC Physical address (in/out) */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync RTHCPHYS HCPhys;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** GC Physical address (in) */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync RTGCPHYS GCPhys;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** GMM page id. (in/out) */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t uHCPhysPageId;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Align at 8 byte boundary. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t uAlignment;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMSHAREDPAGEDESC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a GMMSHAREDPAGEDESC. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMSHAREDPAGEDESC *PGMMSHAREDPAGEDESC;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0SharedModuleCheckRange(PGVM pGVM, PGMMSHAREDMODULE pModule, unsigned idxRegion, unsigned cPages, PGMMSHAREDPAGEDESC paPageDesc);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/**
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Request buffer for GMMR0UnregisterSharedModuleReq / VMMR0_DO_GMM_UNREGISTER_SHARED_MODULE.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @see GMMR0UnregisterSharedModule.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef struct GMMUNREGISTERSHAREDMODULEREQ
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The header. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync SUPVMMR0REQHDR Hdr;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Shared module size. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t cbModule;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Align at 8 byte boundary. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync uint32_t u32Alignment;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Base address of the shared module. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync RTGCPTR64 GCBaseAddr;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Module name */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync char szName[GMM_SHARED_MODULE_MAX_NAME_STRING];
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Module version */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync char szVersion[GMM_SHARED_MODULE_MAX_VERSION_STRING];
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} GMMUNREGISTERSHAREDMODULEREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a GMMR0UnregisterSharedModuleReq / VMMR0_DO_GMM_UNREGISTER_SHARED_MODULE request buffer. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef GMMUNREGISTERSHAREDMODULEREQ *PGMMUNREGISTERSHAREDMODULEREQ;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR0DECL(int) GMMR0UnregisterSharedModuleReq(PVM pVM, VMCPUID idCpu, PGMMUNREGISTERSHAREDMODULEREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifdef IN_RING3
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_gmm_r3 The Global Memory Manager Ring-3 API Wrappers
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @ingroup grp_gmm
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3InitialReservation(PVM pVM, uint64_t cBasePages, uint32_t cShadowPages, uint32_t cFixedPages,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync GMMOCPOLICY enmPolicy, GMMPRIORITY enmPriority);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3UpdateReservation(PVM pVM, uint64_t cBasePages, uint32_t cShadowPages, uint32_t cFixedPages);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3AllocatePagesPrepare(PVM pVM, PGMMALLOCATEPAGESREQ *ppReq, uint32_t cPages, GMMACCOUNT enmAccount);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3AllocatePagesPerform(PVM pVM, PGMMALLOCATEPAGESREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(void) GMMR3AllocatePagesCleanup(PGMMALLOCATEPAGESREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3FreePagesPrepare(PVM pVM, PGMMFREEPAGESREQ *ppReq, uint32_t cPages, GMMACCOUNT enmAccount);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(void) GMMR3FreePagesRePrep(PVM pVM, PGMMFREEPAGESREQ pReq, uint32_t cPages, GMMACCOUNT enmAccount);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3FreePagesPerform(PVM pVM, PGMMFREEPAGESREQ pReq, uint32_t cActualPages);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(void) GMMR3FreePagesCleanup(PGMMFREEPAGESREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(void) GMMR3FreeAllocatedPages(PVM pVM, GMMALLOCATEPAGESREQ const *pAllocReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3AllocateLargePage(PVM pVM, uint32_t cbPage);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3FreeLargePage(PVM pVM, uint32_t idPage);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3MapUnmapChunk(PVM pVM, uint32_t idChunkMap, uint32_t idChunkUnmap, PRTR3PTR ppvR3);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3SeedChunk(PVM pVM, RTR3PTR pvR3);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3QueryHypervisorMemoryStats(PVM pVM, uint64_t *pcTotalAllocPages, uint64_t *pcTotalFreePages, uint64_t *pcTotalBalloonPages);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3QueryMemoryStats(PVM pVM, uint64_t *pcAllocPages, uint64_t *pcMaxPages, uint64_t *pcBalloonPages);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3BalloonedPages(PVM pVM, GMMBALLOONACTION enmAction, uint32_t cBalloonedPages);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3RegisterSharedModule(PVM pVM, PGMMREGISTERSHAREDMODULEREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3UnregisterSharedModule(PVM pVM, PGMMUNREGISTERSHAREDMODULEREQ pReq);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3CheckSharedModules(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncGMMR3DECL(int) GMMR3ResetSharedModules(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @} */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING3 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @} */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncRT_C_DECLS_END
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync