mm.h revision 616637905fa2f00febb1acd553136d7e56316f7c
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @file
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * MM - The Memory Manager.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/*
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Copyright (C) 2006-2007 innotek GmbH
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * This file is part of VirtualBox Open Source Edition (OSE), as
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * available from http://www.virtualbox.org. This file is free software;
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * you can redistribute it and/or modify it under the terms of the GNU
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * General Public License as published by the Free Software Foundation,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * distribution. VirtualBox OSE is distributed in the hope that it will
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * be useful, but WITHOUT ANY WARRANTY of any kind.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * If you received this file as part of a commercial VirtualBox
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * distribution, then only the terms of your commercial VirtualBox
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * license agreement apply instead of the previous paragraph.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#ifndef ___VBox_mm_h
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define ___VBox_mm_h
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy Tummala
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#include <VBox/cdefs.h>
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#include <VBox/types.h>
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#include <VBox/x86.h>
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#include <VBox/sup.h>
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China__BEGIN_DECLS
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @defgroup grp_mm The Memory Manager API
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @name RAM Page Flags
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Since internal ranges have a byte granularity it's possible for a
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * page be flagged for several uses. The access virtualization in PGM
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * will choose the most restricted one and use EM to emulate access to
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * the less restricted areas of the page.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Bits 0-11 only since they are fitted into the offset part of a physical memory address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** Reserved - No RAM, but can be used for MMIO or ROM.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * If this bit is cleared the memory is assumed to be some kind of RAM.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * MMIO2 will for instance not set this flag, neither will ROM (wrong it's set :/). Normal MMIO
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * may set it but that depends on whether the RAM range was created specially
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * for the MMIO or not.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * N.B. The current implementation will always reserve backing memory for reserved
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * ranges to simplify things.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_RESERVED BIT(0)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** ROM - Read Only Memory.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * The page have a HC physical address which contains the BIOS code. All write
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * access is trapped and ignored.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_ROM BIT(1)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** MMIO - Memory Mapped I/O.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * All access is trapped and emulated. No physical backing is required, but
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * might for various reasons be present.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_MMIO BIT(2)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** MMIO2 - Memory Mapped I/O, variation 2.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * The virtualization is performed using real memory and only catching
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * a few accesses for like keeping track for dirty pages.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_MMIO2 BIT(3)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** PGM has virtual page access handler(s) defined for pages with this flag. */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_VIRTUAL_HANDLER BIT(4)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** PGM has virtual page access handler(s) for write access. */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_VIRTUAL_WRITE BIT(5)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** PGM has virtual page access handler(s) for all access. */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_VIRTUAL_ALL BIT(6)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** PGM has physical page access handler(s) defined for pages with this flag. */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_PHYSICAL_HANDLER BIT(7)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** PGM has physical page access handler(s) for write access. */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_PHYSICAL_WRITE BIT(8)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** PGM has physical page access handler(s) for all access. */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_PHYSICAL_ALL BIT(9)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** PGM has physical page access handler(s) for this page and has temporarily disabled it. */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_PHYSICAL_TEMP_OFF BIT(10)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** Physical backing memory is allocated dynamically. Not set implies a one time static allocation. */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_DYNAMIC_ALLOC BIT(11)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** The shift used to get the reference count. */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_CREFS_SHIFT 62
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** The mask applied to the the page pool idx after using MM_RAM_FLAGS_CREFS_SHIFT to shift it down. */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_CREFS_MASK 0x3
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** The (shifted) cRef value used to indiciate that the idx is the head of a
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * physical cross reference extent list. */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_CREFS_PHYSEXT MM_RAM_FLAGS_CREFS_MASK
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China/** The shift used to get the page pool idx. (Apply MM_RAM_FLAGS_IDX_MASK to the result when shifting down). */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_IDX_SHIFT 48
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** The mask applied to the the page pool idx after using MM_RAM_FLAGS_IDX_SHIFT to shift it down. */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_IDX_MASK 0x3fff
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** The idx value when we're out of of extents or there are simply too many mappings of this page. */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_IDX_OVERFLOWED MM_RAM_FLAGS_IDX_MASK
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** Mask for masking off any references to the page. */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#define MM_RAM_FLAGS_NO_REFS_MASK UINT64_C(0x0000ffffffffffff)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @} */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China/** @name MMR3PhysRegisterEx registration type
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing Chinatypedef enum
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China /** Normal physical region (flags specify exact page type) */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_PHYS_TYPE_NORMAL = 0,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China /** Allocate part of a dynamically allocated physical region */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_PHYS_TYPE_DYNALLOC_CHUNK,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_PHYS_TYPE_32BIT_HACK = 0x7fffffff
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China} MMPHYSREG;
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @} */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Memory Allocation Tags.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * For use with MMHyperAlloc(), MMR3HeapAlloc(), MMR3HeapAllocEx(),
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * MMR3HeapAllocZ() and MMR3HeapAllocZEx().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @remark Don't forget to update the dump command in MMHeap.cpp!
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing Chinatypedef enum MMTAG
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_INVALID = 0,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_CFGM,
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China MM_TAG_CFGM_BYTES,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_CFGM_STRING,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_CFGM_USER,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_CSAM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_CSAM_PATCH,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_DBGF,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_DBGF_INFO,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_DBGF_LINE,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_DBGF_LINE_DUP,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_DBGF_STACK,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_DBGF_SYMBOL,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_DBGF_SYMBOL_DUP,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_DBGF_MODULE,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_EM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_IOM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_IOM_STATS,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_MM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_MM_LOOKUP_GUEST,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_MM_LOOKUP_PHYS,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_MM_LOOKUP_VIRT,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_MM_PAGE,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_PATM,
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China MM_TAG_PATM_PATCH,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_PDM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_PDM_DEVICE,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_PDM_DEVICE_USER,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_PDM_DRIVER,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_PDM_DRIVER_USER,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_PDM_LUN,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_PDM_QUEUE,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_PDM_THREAD,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_PGM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_PGM_HANDLERS,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_PGM_POOL,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_REM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_SELM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_SSM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_STAM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_TM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_TRPM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_VM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_VM_REQ,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_VMM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_HWACCM,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MM_TAG_32BIT_HACK = 0x7fffffff
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China} MMTAG;
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @defgroup grp_mm_hyper Hypervisor Memory Management
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @ingroup grp_mm
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @{ */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Converts a ring-0 host context address in the Hypervisor memory region to a ring-3 host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns ring-3 host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param R0Ptr The ring-0 host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTR3PTR) MMHyperR0ToR3(PVM pVM, RTR0PTR R0Ptr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Converts a ring-0 host context address in the Hypervisor memory region to a guest context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns guest context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param R0Ptr The ring-0 host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTGCPTR) MMHyperR0ToGC(PVM pVM, RTR0PTR R0Ptr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Converts a ring-0 host context address in the Hypervisor memory region to a current context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns current context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param R0Ptr The ring-0 host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#ifndef IN_RING0
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(void *) MMHyperR0ToCC(PVM pVM, RTR0PTR R0Ptr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#endif
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Converts a ring-3 host context address in the Hypervisor memory region to a ring-0 host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns ring-0 host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param R3Ptr The ring-3 host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTR0PTR) MMHyperR3ToR0(PVM pVM, RTR3PTR R3Ptr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Converts a ring-3 host context address in the Hypervisor memory region to a guest context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns guest context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param R3Ptr The ring-3 host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTGCPTR) MMHyperR3ToGC(PVM pVM, RTR3PTR R3Ptr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Converts a ring-3 host context address in the Hypervisor memory region to a current context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns current context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param R3Ptr The ring-3 host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#ifndef IN_RING3
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(void *) MMHyperR3ToCC(PVM pVM, RTR3PTR R3Ptr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#else
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(void *) MMHyperR3ToCC(PVM pVM, RTR3PTR R3Ptr)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China NOREF(pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China return R3Ptr;
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China}
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#endif
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Converts a guest context address in the Hypervisor memory region to a ring-3 context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns ring-3 host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPtr The guest context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTR3PTR) MMHyperGCToR3(PVM pVM, RTGCPTR GCPtr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Converts a guest context address in the Hypervisor memory region to a ring-0 host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns ring-0 host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPtr The guest context address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTR0PTR) MMHyperGCToR0(PVM pVM, RTGCPTR GCPtr);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China/**
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * Converts a guest context address in the Hypervisor memory region to a current context address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China *
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @returns current context address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param GCPtr The guest host context address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China#ifndef IN_GC
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaMMDECL(void *) MMHyperGCToCC(PVM pVM, RTGCPTR GCPtr);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China#else
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(void *) MMHyperGCToCC(PVM pVM, RTGCPTR GCPtr)
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China{
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China NOREF(pVM);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China return GCPtr;
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China}
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China#endif
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China/**
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * Converts a current context address in the Hypervisor memory region to a ring-3 host context address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China *
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @returns ring-3 host context address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pv The current context address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China#ifndef IN_RING3
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTR3PTR) MMHyperCCToR3(PVM pVM, void *pv);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China#else
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(RTR3PTR) MMHyperCCToR3(PVM pVM, void *pv)
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China{
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China NOREF(pVM);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China return pv;
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China}
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China#endif
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China/**
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * Converts a current context address in the Hypervisor memory region to a ring-0 host context address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China *
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @returns ring-0 host context address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pv The current context address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China#ifndef IN_RING0
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTR0PTR) MMHyperCCToR0(PVM pVM, void *pv);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China#else
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(RTR0PTR) MMHyperCCToR0(PVM pVM, void *pv)
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China{
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China NOREF(pVM);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China return pv;
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China}
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China#endif
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China/**
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * Converts a current context address in the Hypervisor memory region to a guest context address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China *
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @returns guest context address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pv The current context address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China#ifndef IN_GC
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTGCPTR) MMHyperCCToGC(PVM pVM, void *pv);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China#else
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(RTGCPTR) MMHyperCCToGC(PVM pVM, void *pv)
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China{
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China NOREF(pVM);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China return pv;
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China}
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China#endif
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China/**
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * Converts a current context address in the Hypervisor memory region to a HC address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * The memory must have been allocated with MMHyperAlloc().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns HC address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param Ptr The current context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @deprecated
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#ifdef IN_GC
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTHCPTR) MMHyper2HC(PVM pVM, uintptr_t Ptr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#else
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(RTHCPTR) MMHyper2HC(PVM pVM, uintptr_t Ptr)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China NOREF(pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China return (RTHCPTR)Ptr;
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China}
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#endif
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Converts a current context address in the Hypervisor memory region to a GC address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * The memory must have been allocated with MMHyperAlloc().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns HC address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param Ptr The current context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#ifndef IN_GC
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTGCPTR) MMHyper2GC(PVM pVM, uintptr_t Ptr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#else
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(RTGCPTR) MMHyper2GC(PVM pVM, uintptr_t Ptr)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China NOREF(pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China return (RTGCPTR)Ptr;
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China}
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#endif
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Converts a HC address in the Hypervisor memory region to a GC address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * The memory must have been allocated with MMGCHyperAlloc() or MMR3HyperAlloc().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns GC address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param HCPtr The host context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @deprecated
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTGCPTR) MMHyperHC2GC(PVM pVM, RTHCPTR HCPtr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Converts a GC address in the Hypervisor memory region to a HC address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * The memory must have been allocated with MMGCHyperAlloc() or MMR3HyperAlloc().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns HC address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPtr The guest context address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * You'll be damned if this is not in the HMA! :-)
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @deprecated
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTHCPTR) MMHyperGC2HC(PVM pVM, RTGCPTR GCPtr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Allocates memory in the Hypervisor (GC VMM) area.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * The returned memory is of course zeroed.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cb Number of bytes to allocate.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param uAlignment Required memory alignment in bytes.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Values are 0,8,16,32 and PAGE_SIZE.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * 0 -> default alignment, i.e. 8 bytes.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param enmTag The statistics tag.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param ppv Where to store the address to the allocated
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * memory.
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy Tummala * @remark This is assumed not to be used at times when serialization is required.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(int) MMHyperAlloc(PVM pVM, size_t cb, uint32_t uAlignment, MMTAG enmTag, void **ppv);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy Tummala * Free memory allocated using MMHyperAlloc().
fcfc878b917d4c5ca9d1d067c725cc529a551ac3Pavan Chandrashekar *
fcfc878b917d4c5ca9d1d067c725cc529a551ac3Pavan Chandrashekar * It's not possible to free memory which is page aligned!
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy Tummala *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pv The memory to free.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @remark Try avoid freeing hyper memory.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(int) MMHyperFree(PVM pVM, void *pv);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#ifdef DEBUG
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Dumps the hypervisor heap to Log.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM Handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(void) MMHyperHeapDump(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#endif
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Query the amount of free memory in the hypervisor heap.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Number of free bytes in the hypervisor heap.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread Any.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(size_t) MMHyperHeapGetFreeSize(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Query the size the hypervisor heap.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns The size of the hypervisor heap in bytes.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread Any.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(size_t) MMHyperHeapGetSize(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Query the address and size the hypervisor memory area.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Base address of the hypervisor area.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM Handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pcb Where to store the size of the hypervisor area. (out)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread Any.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTGCPTR) MMHyperGetArea(PVM pVM, size_t *pcb);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Checks if an address is within the hypervisor memory area.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns true if inside.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns false if outside.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPtr The pointer to check.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(bool) MMHyperIsInsideArea(PVM pVM, RTGCPTR GCPtr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Convert a page in the page pool to a HC physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * This works for pages allocated by MMR3PageAlloc(), MMR3PageAllocPhys()
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * and MMR3PageAllocLow().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Physical address for the specified page table.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pvPage Page which physical address we query.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(RTHCPHYS) MMPage2Phys(PVM pVM, void *pvPage);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Convert physical address of a page to a HC virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * This works for pages allocated by MMR3PageAlloc(), MMR3PageAllocPhys()
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * and MMR3PageAllocLow().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Pointer to the page at that physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param HCPhysPage The physical address of a page.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaMMDECL(void *) MMPagePhys2Page(PVM pVM, RTHCPHYS HCPhysPage);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Convert physical address of a page to a HC virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * This works for pages allocated by MMR3PageAlloc(), MMR3PageAllocPhys()
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * and MMR3PageAllocLow().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param HCPhysPage The physical address of a page.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param ppvPage Where to store the address corresponding to HCPhysPage.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(int) MMPagePhys2PageEx(PVM pVM, RTHCPHYS HCPhysPage, void **ppvPage);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Try convert physical address of a page to a HC virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * This works for pages allocated by MMR3PageAlloc(), MMR3PageAllocPhys()
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * and MMR3PageAllocLow().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param HCPhysPage The physical address of a page.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param ppvPage Where to store the address corresponding to HCPhysPage.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(int) MMPagePhys2PageTry(PVM pVM, RTHCPHYS HCPhysPage, void **ppvPage);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Convert GC physical address to HC virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns HC virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM Handle
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPhys Guest context physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cbRange Physical range
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @deprecated
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(void *) MMPhysGCPhys2HCVirt(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Convert GC virtual address to HC virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * This uses the current PD of the guest.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns HC virtual address.
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy Tummala * @param pVM VM Handle
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPtr Guest context virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @deprecated
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy Tummala */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(void *) MMPhysGCVirt2HCVirt(PVM pVM, RTGCPTR pvGC);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @def MMHYPER_GC_ASSERT_GCPTR
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Asserts that an address is either NULL or inside the hypervisor memory area.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * This assertion only works while IN_GC, it's a NOP everywhere else.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#ifdef IN_GC
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China# define MMHYPER_GC_ASSERT_GCPTR(pVM, GCPtr) Assert(MMHyperIsInsideArea((pVM), (GCPtr)) || !(GCPtr))
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#else
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China# define MMHYPER_GC_ASSERT_GCPTR(pVM, GCPtr) do { } while (0)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#endif
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy Tummala
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy Tummala/** @} */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy Tummala
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#ifdef IN_RING3
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @defgroup grp_mm_r3 The MM Host Context Ring-3 API
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @ingroup grp_mm
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Initialization of MM (save anything depending on PGM).
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3Init(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Initializes the MM parts which depends on PGM being initialized.
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy Tummala *
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy Tummala * @returns VBox status code.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy Tummala * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy TummalaMMR3DECL(int) MMR3InitPaging(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Finalizes the HMA mapping.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * This is called later during init, most (all) HMA allocations should be done
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * by the time this function is called.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3HyperInitFinalize(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Terminates the MM.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Termination means cleaning up and freeing all resources,
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * the VM it self is at this point powered off or suspended.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3Term(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Convert HC Physical address to HC Virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param HCPhys The host context virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param ppv Where to store the resulting address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3HCPhys2HCVirt(PVM pVM, RTHCPHYS HCPhys, void **ppv);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Read memory from GC virtual address using the current guest CR3.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pvDst Destination address (HC of course).
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPtr GC virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cb Number of bytes to read.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3ReadGCVirt(PVM pVM, void *pvDst, RTGCPTR GCPtr, size_t cb);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Write to memory at GC virtual address translated using the current guest CR3.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPtrDst GC virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pvSrc The source address (HC of course).
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cb Number of bytes to read.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3WriteGCVirt(PVM pVM, RTGCPTR GCPtrDst, const void *pvSrc, size_t cb);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @defgroup grp_mm_r3_hyper Hypervisor Memory Manager (HC R3 Portion)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @ingroup grp_mm_r3
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @{ */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Allocates memory in the Hypervisor (GC VMM) area which never will
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * be freed and don't have any offset based relation to other heap blocks.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * The latter means that two blocks allocated by this API will not have the
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * same relative position to each other in GC and HC. In short, never use
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * this API for allocating nodes for an offset based AVL tree!
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * The returned memory is of course zeroed.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM to operate on.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cb Number of bytes to allocate.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param uAlignment Required memory alignment in bytes.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Values are 0,8,16,32 and PAGE_SIZE.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * 0 -> default alignment, i.e. 8 bytes.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param enmTag The statistics tag.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param ppv Where to store the address to the allocated
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * memory.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @remark This is assumed not to be used at times when serialization is required.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMDECL(int) MMR3HyperAllocOnceNoRel(PVM pVM, size_t cb, uint32_t uAlignment, MMTAG enmTag, void **ppv);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Maps contiguous HC physical memory into the hypervisor region in the GC.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @return VBox status code.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China *
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pvHC Host context address of the memory. Must be page aligned!
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param HCPhys Host context physical address of the memory to be mapped. Must be page aligned!
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param cb Size of the memory. Will be rounded up to nearest page.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pszDesc Description.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pGCPtr Where to store the GC address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3HyperMapHCPhys(PVM pVM, void *pvHC, RTHCPHYS HCPhys, size_t cb, const char *pszDesc, PRTGCPTR pGCPtr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Maps contiguous GC physical memory into the hypervisor region in the GC.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @return VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPhys Guest context physical address of the memory to be mapped. Must be page aligned!
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cb Size of the memory. Will be rounded up to nearest page.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pszDesc Mapping description.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pGCPtr Where to store the GC address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3HyperMapGCPhys(PVM pVM, RTGCPHYS GCPhys, size_t cb, const char *pszDesc, PRTGCPTR pGCPtr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Locks and Maps HC virtual memory into the hypervisor region in the GC.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @return VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pvHC Host context address of the memory (may be not page aligned).
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cb Size of the memory. Will be rounded up to nearest page.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param fFree Set this if MM is responsible for freeing the memory using SUPPageFree.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pszDesc Mapping description.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pGCPtr Where to store the GC address corresponding to pvHC.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3HyperMapHCRam(PVM pVM, void *pvHC, size_t cb, bool fFree, const char *pszDesc, PRTGCPTR pGCPtr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Maps locked R3 virtual memory into the hypervisor region in the GC.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @return VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pvR3 The ring-3 address of the memory, must be page aligned.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pvR0 The ring-0 address of the memory, must be page aligned. (optional)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cPages The number of pages.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param paPages The page descriptors.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pszDesc Mapping description.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pGCPtr Where to store the GC address corresponding to pvHC.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3HyperMapPages(PVM pVM, void *pvR3, RTR0PTR pvR0, size_t cPages, PCSUPPAGE paPages, const char *pszDesc, PRTGCPTR pGCPtr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Reserves a hypervisor memory area.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Most frequent usage is fence pages and dynamically mappings like the guest PD and PDPTR.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @return VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cb Size of the memory. Will be rounded up to nearest page.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pszDesc Mapping description.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pGCPtr Where to store the assigned GC address. Optional.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3HyperReserve(PVM pVM, unsigned cb, const char *pszDesc, PRTGCPTR pGCPtr);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Convert hypervisor HC virtual address to HC physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns HC physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM Handle
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pvHC Host context physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(RTHCPHYS) MMR3HyperHCVirt2HCPhys(PVM pVM, void *pvHC);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Convert hypervisor HC virtual address to HC physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns HC physical address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pVM VM Handle
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pvHC Host context physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pHCPhys Where to store the HC physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3HyperHCVirt2HCPhysEx(PVM pVM, void *pvHC, PRTHCPHYS pHCPhys);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Convert hypervisor HC physical address to HC virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns HC virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM Handle
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param HCPhys Host context physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(void *) MMR3HyperHCPhys2HCVirt(PVM pVM, RTHCPHYS HCPhys);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Convert hypervisor HC physical address to HC virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM Handle
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param HCPhys Host context physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param ppv Where to store the HC virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3HyperHCPhys2HCVirtEx(PVM pVM, RTHCPHYS HCPhys, void **ppv);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Read hypervisor memory from GC virtual address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pvDst Destination address (HC of course).
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param GCPtr GC virtual address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param cb Number of bytes to read.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3HyperReadGCVirt(PVM pVM, void *pvDst, RTGCPTR GCPtr, size_t cb);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China/** @} */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China/** @defgroup grp_mm_phys Guest Physical Memory Manager
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @ingroup grp_mm_r3
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @{ */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China/**
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * Register externally allocated RAM for the virtual machine.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China *
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * The memory registered with the VM thru this interface must not be freed
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * before the virtual machine has been destroyed. Bad things may happen... :-)
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China *
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @return VBox status code.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pvRam Virtual address of the guest's physical memory range Must be page aligned.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPhys The physical address the ram shall be registered at.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param cb Size of the memory. Must be page aligend.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param fFlags Flags of the MM_RAM_FLAGS_* defines.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pszDesc Description of the memory.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3PhysRegister(PVM pVM, void *pvRam, RTGCPHYS GCPhys, unsigned cb, unsigned fFlags, const char *pszDesc);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Register externally allocated RAM for the virtual machine.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * The memory registered with the VM thru this interface must not be freed
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * before the virtual machine has been destroyed. Bad things may happen... :-)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @return VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pvRam Virtual address of the guest's physical memory range Must be page aligned.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPhys The physical address the ram shall be registered at.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cb Size of the memory. Must be page aligend.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param fFlags Flags of the MM_RAM_FLAGS_* defines.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param enmType Physical range type (MM_PHYS_TYPE_*)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pszDesc Description of the memory.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @todo update this description.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3PhysRegisterEx(PVM pVM, void *pvRam, RTGCPHYS GCPhys, unsigned cb, unsigned fFlags, MMPHYSREG enmType, const char *pszDesc);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Register previously registered externally allocated RAM for the virtual machine.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Use this only for MMIO ranges or the guest will become very confused.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * The memory registered with the VM thru this interface must not be freed
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * before the virtual machine has been destroyed. Bad things may happen... :-)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @return VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPhysOld The physical address the ram was registered at.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPhysNew The physical address the ram shall be registered at.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cb Size of the memory. Must be page aligend.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3PhysRelocate(PVM pVM, RTGCPHYS GCPhysOld, RTGCPHYS GCPhysNew, unsigned cb);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Register a ROM (BIOS) region.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * It goes without saying that this is read-only memory. The memory region must be
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * in unassigned memory. I.e. from the top of the address space or on the PC in
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * the 0xa0000-0xfffff range.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM Handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pDevIns The device instance owning the ROM region.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPhys First physical address in the range.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Must be page aligned!
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cbRange The size of the range (in bytes).
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Must be page aligned!
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pvBinary Pointer to the binary data backing the ROM image.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * This must be cbRange bytes big.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * It will be copied and doesn't have to stick around.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pszDesc Pointer to description string. This must not be freed.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @remark There is no way to remove the rom, automatically on device cleanup or
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * manually from the device yet. At present I doubt we need such features...
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3PhysRomRegister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, const void *pvBinary, const char *pszDesc);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Reserve physical address space for ROM and MMIO ranges.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status code.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM Handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param GCPhys Start physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cbRange The size of the range.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pszDesc Description string.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3PhysReserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange, const char *pszDesc);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Get the size of the base RAM.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * This usually means the size of the first contigous block of physical memory.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread Any.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(uint64_t) MMR3PhysGetRamSize(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @} */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @defgroup grp_mm_page Physical Page Pool
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @ingroup grp_mm_r3
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @{ */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Allocates a page from the page pool.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * This function may returns pages which has physical addresses any
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * where. If you require a page to be within the first 4GB of physical
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * memory, use MMR3PageAllocLow().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Pointer to the allocated page page.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns NULL on failure.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(void *) MMR3PageAlloc(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Allocates a page from the page pool and return its physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * This function may returns pages which has physical addresses any
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * where. If you require a page to be within the first 4GB of physical
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * memory, use MMR3PageAllocLow().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Pointer to the allocated page page.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns NIL_RTHCPHYS on failure.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(RTHCPHYS) MMR3PageAllocPhys(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Frees a page allocated from the page pool by MMR3PageAlloc() and MMR3PageAllocPhys().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pvPage Pointer to the page.
1cfa752f4e24c34133009b0f6c139127a5c461deRamaswamy Tummala * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(void) MMR3PageFree(PVM pVM, void *pvPage);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China/**
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * Allocates a page from the low page pool.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China *
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @returns Pointer to the allocated page.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @returns NULL on failure.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(void *) MMR3PageAllocLow(PVM pVM);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China/**
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * Frees a page allocated from the page pool by MMR3PageAllocLow().
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China *
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pvPage Pointer to the page.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China */
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(void) MMR3PageFreeLow(PVM pVM, void *pvPage);
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China/**
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * Free a page allocated from the page pool by physical address.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * This works for pages allocated by MMR3PageAlloc(), MMR3PageAllocPhys()
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * and MMR3PageAllocLow().
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China *
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
03514dd70879e522caeae9bc4b36d18c43e15a43ke ge - Sun Microsystems - Beijing China * @param HCPhysPage The physical address of the page to be freed.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(void) MMR3PageFreeByPhys(PVM pVM, RTHCPHYS HCPhysPage);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Gets the HC pointer to the dummy page.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * The dummy page is used as a place holder to prevent potential bugs
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * from doing really bad things to the system.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Pointer to the dummy page.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(void *) MMR3PageDummyHCPtr(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Gets the HC Phys to the dummy page.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * The dummy page is used as a place holder to prevent potential bugs
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * from doing really bad things to the system.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Pointer to the dummy page.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread The Emulation Thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(RTHCPHYS) MMR3PageDummyHCPhys(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#if 1 /* these are temporary wrappers and will be removed soon */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Allocates a Page Table.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China *
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @returns Pointer to page table.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @returns NULL on failure.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @deprecated Use MMR3PageAlloc().
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(PVBOXPT) MMR3PTAlloc(PVM pVM)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China return (PVBOXPT)MMR3PageAlloc(pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China}
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Free a Page Table.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pPT Pointer to the page table as returned by MMR3PTAlloc().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @deprecated Use MMR3PageFree().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(void) MMR3PTFree(PVM pVM, PVBOXPT pPT)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China{
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China MMR3PageFree(pVM, pPT);
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China}
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China/**
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * Free a Page Table by physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param HCPhysPT The physical address of the page table to be freed.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @deprecated Use MMR3PageFreeByPhys().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(void) MMR3PTFreeByPhys(PVM pVM, RTHCPHYS HCPhysPT)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China MMR3PageFreeByPhys(pVM, HCPhysPT);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China}
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Convert a Page Table address to a HC physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @returns Physical address for the specified page table.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pPT Page table which physical address we query.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @deprecated Use MMR3Page2Phys().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(RTHCPHYS) MMR3PT2Phys(PVM pVM, PVBOXPT pPT)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China return MMPage2Phys(pVM, pPT);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China}
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Convert a physical address to a page table address
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Pointer to the page table at that physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param PhysPT Page table which physical address we query.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @deprecated Use MMR3PagePhys2Page().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(PVBOXPT) MMR3Phys2PT(PVM pVM, RTHCPHYS PhysPT)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China{
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China return (PVBOXPT)MMPagePhys2Page(pVM, PhysPT);
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China}
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China/**
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * Allocate a Page Directory.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China *
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @returns Pointer to the page directory.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @returns NULL on failure.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @deprecated Use MMR3PageAlloc().
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China */
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(PVBOXPD) MMR3PDAlloc(PVM pVM)
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China{
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China return (PVBOXPD)MMR3PageAlloc(pVM);
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China}
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China/**
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * Free a Page Directory.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China *
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @param pPD Pointer to the page directory allocated by MMR3PDAlloc().
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @deprecated Use MMR3PageFree().
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China */
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(void) MMR3PDFree(PVM pVM, PVBOXPD pPD)
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China{
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China MMR3PageFree(pVM, pPD);
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China}
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China/**
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * Convert a Page Directory address to a physical address.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China *
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @returns Physical address for the specified page directory.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @param pPD Page directory which physical address we query.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * Allocated by MMR3PDAlloc().
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @deprecated Use MMR3Page2Phys().
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China */
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(RTHCPHYS) MMR3PD2Phys(PVM pVM, PVBOXPD pPD)
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China{
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China return MMPage2Phys(pVM, pPD);
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China}
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Convert a physical address to a page directory address
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @returns Pointer to the page directory at that physical address.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param PhysPD Physical address of page directory.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Allocated by MMR3PDAlloc().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @deprecated Use MMR3PageAlloc().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(PVBOXPD) MMR3Phys2PD(PVM pVM, RTHCPHYS PhysPD)
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China return (PVBOXPD)MMPagePhys2Page(pVM, PhysPD);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China}
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @deprecated */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(void *) MMR3DummyPageHCPtr(PVM pVM) { return MMR3PageDummyHCPtr(pVM); }
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @deprecated */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaDECLINLINE(RTHCPHYS) MMR3DummyPageHCPhys(PVM pVM) { return MMR3PageDummyHCPhys(pVM); }
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#endif /* will be removed */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @} */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @defgroup grp_mm_heap Heap Manager
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @ingroup grp_mm_r3
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @{ */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Allocate memory associating it with the VM for collective cleanup.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * The memory will be allocated from the default heap but a header
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * is added in which we keep track of which VM it belongs to and chain
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * all the allocations together so they can be freed in a one go.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China *
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * This interface is typically used for memory block which will not be
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * freed during the life of the VM.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China *
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @returns Pointer to allocated memory.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @param enmTag Statistics tag. Statistics are collected on a per tag
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * basis in addition to a global one. Thus we can easily
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * identify how memory is used by the VM.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cbSize Size of the block.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * @thread Any thread.
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(void *) MMR3HeapAlloc(PVM pVM, MMTAG enmTag, size_t cbSize);
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Same as MMR3HeapAlloc().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Pointer to allocated memory.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param enmTag Statistics tag. Statistics are collected on a per tag
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * basis in addition to a global one. Thus we can easily
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * identify how memory is used by the VM.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cbSize Size of the block.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param ppv Where to store the pointer to the allocated memory on success.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread Any thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3HeapAllocEx(PVM pVM, MMTAG enmTag, size_t cbSize, void **ppv);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China/**
a567cb7199dcb7e0c1d645cd14307998ef4632a3ke ge - Sun Microsystems - Beijing China * Same as MMR3HeapAlloc() only the memory is zeroed.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Pointer to allocated memory.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param enmTag Statistics tag. Statistics are collected on a per tag
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * basis in addition to a global one. Thus we can easily
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * identify how memory is used by the VM.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cbSize Size of the block.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread Any thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(void *) MMR3HeapAllocZ(PVM pVM, MMTAG enmTag, size_t cbSize);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Same as MMR3HeapAllocZ().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Pointer to allocated memory.
1a5e258f5471356ca102c7176637cdce45bac147Josef 'Jeff' Sipek * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param enmTag Statistics tag. Statistics are collected on a per tag
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * basis in addition to a global one. Thus we can easily
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * identify how memory is used by the VM.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cbSize Size of the block.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param ppv Where to store the pointer to the allocated memory on success.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread Any thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(int) MMR3HeapAllocZEx(PVM pVM, MMTAG enmTag, size_t cbSize, void **ppv);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Reallocate memory allocated with MMR3HeapAlloc() or MMR3HeapRealloc().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Pointer to reallocated memory.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pv Pointer to the memory block to reallocate.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Must not be NULL!
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cbNewSize New block size.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread Any thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(void *) MMR3HeapRealloc(void *pv, size_t cbNewSize);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
1a5e258f5471356ca102c7176637cdce45bac147Josef 'Jeff' Sipek * Duplicates the specified string.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns Pointer to the duplicate.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns NULL on failure or when input NULL.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param enmTag Statistics tag. Statistics are collected on a per tag
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * basis in addition to a global one. Thus we can easily
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * identify how memory is used by the VM.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param psz The string to duplicate. NULL is allowed.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(char *) MMR3HeapStrDup(PVM pVM, MMTAG enmTag, const char *psz);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Releases memory allocated with MMR3HeapAlloc() or MMR3HeapRealloc().
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pv Pointer to the memory block to free.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @thread Any thread.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMR3DECL(void) MMR3HeapFree(void *pv);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @} */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @} */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#endif
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#ifdef IN_GC
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @defgroup grp_mm_gc The MM Guest Context API
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @ingroup grp_mm
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @{
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Install MMGCRam Hypervisor page fault handler for normal working
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * of MMGCRamRead and MMGCRamWrite calls.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * This handler will be automatically removed at page fault.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * In other case it must be removed by MMGCRamDeregisterTrapHandler call.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMGCDECL(void) MMGCRamRegisterTrapHandler(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Remove MMGCRam Hypervisor page fault handler.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * See description of MMGCRamRegisterTrapHandler call.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMGCDECL(void) MMGCRamDeregisterTrapHandler(PVM pVM);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Read data in guest context with \#PF control.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * MMRamGC page fault handler must be installed prior this call for safe operation.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Use MMGCRamRegisterTrapHandler() call for this task.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pDst Where to store the readed data.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pSrc Pointer to the data to read.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cb Size of data to read, only 1/2/4/8 is valid.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMGCDECL(int) MMGCRamReadNoTrapHandler(void *pDst, void *pSrc, size_t cb);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Write data in guest context with \#PF control.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * MMRamGC page fault handler must be installed prior this call for safe operation.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Use MMGCRamRegisterTrapHandler() call for this task.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pDst Where to write the data.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pSrc Pointer to the data to write.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cb Size of data to write, only 1/2/4 is valid.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMGCDECL(int) MMGCRamWriteNoTrapHandler(void *pDst, void *pSrc, size_t cb);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Read data in guest context with \#PF control.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pDst Where to store the readed data.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pSrc Pointer to the data to read.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cb Size of data to read, only 1/2/4/8 is valid.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMGCDECL(int) MMGCRamRead(PVM pVM, void *pDst, void *pSrc, size_t cb);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/**
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * Write data in guest context with \#PF control.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China *
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @returns VBox status.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pVM The VM handle.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pDst Where to write the data.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param pSrc Pointer to the data to write.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China * @param cb Size of data to write, only 1/2/4 is valid.
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing ChinaMMGCDECL(int) MMGCRamWrite(PVM pVM, void *pDst, void *pSrc, size_t cb);
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @} */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#endif
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China/** @} */
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China__END_DECLS
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China#endif
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China
93c426a1dbbb1987537f122c9e8342b2d9347210ke ge - Sun Microsystems - Beijing China