1 | /** @file
|
---|
2 | * MM - The Memory Manager.
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | * available from http://www.virtualbox.org. This file is free software;
|
---|
10 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | * General Public License (GPL) as published by the Free Software
|
---|
12 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | *
|
---|
16 | * The contents of this file may alternatively be used under the terms
|
---|
17 | * of the Common Development and Distribution License Version 1.0
|
---|
18 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
19 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
20 | * CDDL are applicable instead of those of the GPL.
|
---|
21 | *
|
---|
22 | * You may elect to license modified versions of this file under the
|
---|
23 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
24 | *
|
---|
25 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
26 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
27 | * additional information or have any questions.
|
---|
28 | */
|
---|
29 |
|
---|
30 | #ifndef ___VBox_mm_h
|
---|
31 | #define ___VBox_mm_h
|
---|
32 |
|
---|
33 | #include <VBox/cdefs.h>
|
---|
34 | #include <VBox/types.h>
|
---|
35 | #include <VBox/x86.h>
|
---|
36 | #include <iprt/stdarg.h>
|
---|
37 | #include <VBox/sup.h>
|
---|
38 |
|
---|
39 |
|
---|
40 | __BEGIN_DECLS
|
---|
41 |
|
---|
42 | /** @defgroup grp_mm The Memory Manager API
|
---|
43 | * @{
|
---|
44 | */
|
---|
45 |
|
---|
46 | #ifndef VBOX_WITH_NEW_PHYS_CODE
|
---|
47 | /** @name RAM Page Flags
|
---|
48 | * Since internal ranges have a byte granularity it's possible for a
|
---|
49 | * page be flagged for several uses. The access virtualization in PGM
|
---|
50 | * will choose the most restricted one and use EM to emulate access to
|
---|
51 | * the less restricted areas of the page.
|
---|
52 | *
|
---|
53 | * Bits 0-11 only since they are fitted into the offset part of a physical memory address.
|
---|
54 | * @{
|
---|
55 | */
|
---|
56 | /** Reserved - Not RAM, ROM nor MMIO2.
|
---|
57 | * If this bit is cleared the memory is assumed to be some kind of RAM.
|
---|
58 | * Normal MMIO may set it but that depends on whether the RAM range was
|
---|
59 | * created specially for the MMIO or not.
|
---|
60 | *
|
---|
61 | * @remarks The current implementation will always reserve backing
|
---|
62 | * memory for reserved ranges to simplify things.
|
---|
63 | */
|
---|
64 | #define MM_RAM_FLAGS_RESERVED RT_BIT(0)
|
---|
65 | /** ROM - Read Only Memory.
|
---|
66 | * The page have a HC physical address which contains the BIOS code. All write
|
---|
67 | * access is trapped and ignored.
|
---|
68 | *
|
---|
69 | * HACK: Writable shadow ROM is indicated by both ROM and MMIO2 being
|
---|
70 | * set. (We're out of bits.)
|
---|
71 | */
|
---|
72 | #define MM_RAM_FLAGS_ROM RT_BIT(1)
|
---|
73 | /** MMIO - Memory Mapped I/O.
|
---|
74 | * All access is trapped and emulated. No physical backing is required, but
|
---|
75 | * might for various reasons be present.
|
---|
76 | */
|
---|
77 | #define MM_RAM_FLAGS_MMIO RT_BIT(2)
|
---|
78 | /** MMIO2 - Memory Mapped I/O, variation 2.
|
---|
79 | * The virtualization is performed using real memory and only catching
|
---|
80 | * a few accesses for like keeping track for dirty pages.
|
---|
81 | * @remark Involved in the shadow ROM hack.
|
---|
82 | */
|
---|
83 | #define MM_RAM_FLAGS_MMIO2 RT_BIT(3)
|
---|
84 |
|
---|
85 | /** Physical backing memory is allocated dynamically. Not set implies a one time static allocation. */
|
---|
86 | #define MM_RAM_FLAGS_DYNAMIC_ALLOC RT_BIT(11)
|
---|
87 | /** @} */
|
---|
88 |
|
---|
89 | /** @name MMR3PhysRegisterEx registration type
|
---|
90 | * @{
|
---|
91 | */
|
---|
92 | typedef enum
|
---|
93 | {
|
---|
94 | /** Normal physical region (flags specify exact page type) */
|
---|
95 | MM_PHYS_TYPE_NORMAL = 0,
|
---|
96 | /** Allocate part of a dynamically allocated physical region */
|
---|
97 | MM_PHYS_TYPE_DYNALLOC_CHUNK,
|
---|
98 |
|
---|
99 | MM_PHYS_TYPE_32BIT_HACK = 0x7fffffff
|
---|
100 | } MMPHYSREG;
|
---|
101 | /** @} */
|
---|
102 | #endif /* !VBOX_WITH_NEW_PHYS_CODE */
|
---|
103 |
|
---|
104 | /**
|
---|
105 | * Memory Allocation Tags.
|
---|
106 | * For use with MMHyperAlloc(), MMR3HeapAlloc(), MMR3HeapAllocEx(),
|
---|
107 | * MMR3HeapAllocZ() and MMR3HeapAllocZEx().
|
---|
108 | *
|
---|
109 | * @remark Don't forget to update the dump command in MMHeap.cpp!
|
---|
110 | */
|
---|
111 | typedef enum MMTAG
|
---|
112 | {
|
---|
113 | MM_TAG_INVALID = 0,
|
---|
114 |
|
---|
115 | MM_TAG_CFGM,
|
---|
116 | MM_TAG_CFGM_BYTES,
|
---|
117 | MM_TAG_CFGM_STRING,
|
---|
118 | MM_TAG_CFGM_USER,
|
---|
119 |
|
---|
120 | MM_TAG_CSAM,
|
---|
121 | MM_TAG_CSAM_PATCH,
|
---|
122 |
|
---|
123 | MM_TAG_CPUM_CTX,
|
---|
124 |
|
---|
125 | MM_TAG_DBGF,
|
---|
126 | MM_TAG_DBGF_INFO,
|
---|
127 | MM_TAG_DBGF_LINE,
|
---|
128 | MM_TAG_DBGF_LINE_DUP,
|
---|
129 | MM_TAG_DBGF_MODULE,
|
---|
130 | MM_TAG_DBGF_OS,
|
---|
131 | MM_TAG_DBGF_STACK,
|
---|
132 | MM_TAG_DBGF_SYMBOL,
|
---|
133 | MM_TAG_DBGF_SYMBOL_DUP,
|
---|
134 |
|
---|
135 | MM_TAG_EM,
|
---|
136 |
|
---|
137 | MM_TAG_IOM,
|
---|
138 | MM_TAG_IOM_STATS,
|
---|
139 |
|
---|
140 | MM_TAG_MM,
|
---|
141 | MM_TAG_MM_LOOKUP_GUEST,
|
---|
142 | MM_TAG_MM_LOOKUP_PHYS,
|
---|
143 | MM_TAG_MM_LOOKUP_VIRT,
|
---|
144 | MM_TAG_MM_PAGE,
|
---|
145 |
|
---|
146 | MM_TAG_PARAV,
|
---|
147 |
|
---|
148 | MM_TAG_PATM,
|
---|
149 | MM_TAG_PATM_PATCH,
|
---|
150 |
|
---|
151 | MM_TAG_PDM,
|
---|
152 | MM_TAG_PDM_ASYNC_COMPLETION,
|
---|
153 | MM_TAG_PDM_DEVICE,
|
---|
154 | MM_TAG_PDM_DEVICE_USER,
|
---|
155 | MM_TAG_PDM_DRIVER,
|
---|
156 | MM_TAG_PDM_DRIVER_USER,
|
---|
157 | MM_TAG_PDM_USB,
|
---|
158 | MM_TAG_PDM_USB_USER,
|
---|
159 | MM_TAG_PDM_LUN,
|
---|
160 | MM_TAG_PDM_QUEUE,
|
---|
161 | MM_TAG_PDM_THREAD,
|
---|
162 |
|
---|
163 | MM_TAG_PGM,
|
---|
164 | MM_TAG_PGM_CHUNK_MAPPING,
|
---|
165 | MM_TAG_PGM_HANDLERS,
|
---|
166 | MM_TAG_PGM_PHYS,
|
---|
167 | MM_TAG_PGM_POOL,
|
---|
168 |
|
---|
169 | MM_TAG_REM,
|
---|
170 |
|
---|
171 | MM_TAG_SELM,
|
---|
172 |
|
---|
173 | MM_TAG_SSM,
|
---|
174 |
|
---|
175 | MM_TAG_STAM,
|
---|
176 |
|
---|
177 | MM_TAG_TM,
|
---|
178 |
|
---|
179 | MM_TAG_TRPM,
|
---|
180 |
|
---|
181 | MM_TAG_VM,
|
---|
182 | MM_TAG_VM_REQ,
|
---|
183 |
|
---|
184 | MM_TAG_VMM,
|
---|
185 |
|
---|
186 | MM_TAG_HWACCM,
|
---|
187 |
|
---|
188 | MM_TAG_32BIT_HACK = 0x7fffffff
|
---|
189 | } MMTAG;
|
---|
190 |
|
---|
191 |
|
---|
192 |
|
---|
193 |
|
---|
194 | /** @defgroup grp_mm_hyper Hypervisor Memory Management
|
---|
195 | * @ingroup grp_mm
|
---|
196 | * @{ */
|
---|
197 |
|
---|
198 | VMMDECL(RTR3PTR) MMHyperR0ToR3(PVM pVM, RTR0PTR R0Ptr);
|
---|
199 | VMMDECL(RTRCPTR) MMHyperR0ToRC(PVM pVM, RTR0PTR R0Ptr);
|
---|
200 | #ifndef IN_RING0
|
---|
201 | VMMDECL(void *) MMHyperR0ToCC(PVM pVM, RTR0PTR R0Ptr);
|
---|
202 | #endif
|
---|
203 | VMMDECL(RTR0PTR) MMHyperR3ToR0(PVM pVM, RTR3PTR R3Ptr);
|
---|
204 | VMMDECL(RTRCPTR) MMHyperR3ToRC(PVM pVM, RTR3PTR R3Ptr);
|
---|
205 | VMMDECL(RTR3PTR) MMHyperRCToR3(PVM pVM, RTRCPTR RCPtr);
|
---|
206 | VMMDECL(RTR0PTR) MMHyperRCToR0(PVM pVM, RTRCPTR RCPtr);
|
---|
207 |
|
---|
208 | #ifndef IN_RING3
|
---|
209 | VMMDECL(void *) MMHyperR3ToCC(PVM pVM, RTR3PTR R3Ptr);
|
---|
210 | #else
|
---|
211 | DECLINLINE(void *) MMHyperR3ToCC(PVM pVM, RTR3PTR R3Ptr)
|
---|
212 | {
|
---|
213 | NOREF(pVM);
|
---|
214 | return R3Ptr;
|
---|
215 | }
|
---|
216 | #endif
|
---|
217 |
|
---|
218 |
|
---|
219 | #ifndef IN_RC
|
---|
220 | VMMDECL(void *) MMHyperRCToCC(PVM pVM, RTRCPTR RCPtr);
|
---|
221 | #else
|
---|
222 | DECLINLINE(void *) MMHyperRCToCC(PVM pVM, RTRCPTR RCPtr)
|
---|
223 | {
|
---|
224 | NOREF(pVM);
|
---|
225 | return (void *)RCPtr;
|
---|
226 | }
|
---|
227 | #endif
|
---|
228 |
|
---|
229 | #ifndef IN_RING3
|
---|
230 | VMMDECL(RTR3PTR) MMHyperCCToR3(PVM pVM, void *pv);
|
---|
231 | #else
|
---|
232 | DECLINLINE(RTR3PTR) MMHyperCCToR3(PVM pVM, void *pv)
|
---|
233 | {
|
---|
234 | NOREF(pVM);
|
---|
235 | return pv;
|
---|
236 | }
|
---|
237 | #endif
|
---|
238 |
|
---|
239 | #ifndef IN_RING0
|
---|
240 | VMMDECL(RTR0PTR) MMHyperCCToR0(PVM pVM, void *pv);
|
---|
241 | #else
|
---|
242 | DECLINLINE(RTR0PTR) MMHyperCCToR0(PVM pVM, void *pv)
|
---|
243 | {
|
---|
244 | NOREF(pVM);
|
---|
245 | return pv;
|
---|
246 | }
|
---|
247 | #endif
|
---|
248 |
|
---|
249 | #ifndef IN_RC
|
---|
250 | VMMDECL(RTRCPTR) MMHyperCCToRC(PVM pVM, void *pv);
|
---|
251 | #else
|
---|
252 | DECLINLINE(RTRCPTR) MMHyperCCToRC(PVM pVM, void *pv)
|
---|
253 | {
|
---|
254 | NOREF(pVM);
|
---|
255 | return (RTRCPTR)pv;
|
---|
256 | }
|
---|
257 | #endif
|
---|
258 |
|
---|
259 |
|
---|
260 | VMMDECL(int) MMHyperAlloc(PVM pVM, size_t cb, uint32_t uAlignment, MMTAG enmTag, void **ppv);
|
---|
261 | VMMDECL(int) MMHyperFree(PVM pVM, void *pv);
|
---|
262 | VMMDECL(void) MMHyperHeapCheck(PVM pVM);
|
---|
263 | #ifdef DEBUG
|
---|
264 | VMMDECL(void) MMHyperHeapDump(PVM pVM);
|
---|
265 | #endif
|
---|
266 | VMMDECL(size_t) MMHyperHeapGetFreeSize(PVM pVM);
|
---|
267 | VMMDECL(size_t) MMHyperHeapGetSize(PVM pVM);
|
---|
268 | VMMDECL(RTGCPTR) MMHyperGetArea(PVM pVM, size_t *pcb);
|
---|
269 | VMMDECL(bool) MMHyperIsInsideArea(PVM pVM, RTGCPTR GCPtr);
|
---|
270 |
|
---|
271 |
|
---|
272 | VMMDECL(RTHCPHYS) MMPage2Phys(PVM pVM, void *pvPage);
|
---|
273 | VMMDECL(void *) MMPagePhys2Page(PVM pVM, RTHCPHYS HCPhysPage);
|
---|
274 | VMMDECL(int) MMPagePhys2PageEx(PVM pVM, RTHCPHYS HCPhysPage, void **ppvPage);
|
---|
275 | VMMDECL(int) MMPagePhys2PageTry(PVM pVM, RTHCPHYS HCPhysPage, void **ppvPage);
|
---|
276 |
|
---|
277 |
|
---|
278 | /** @def MMHYPER_RC_ASSERT_RCPTR
|
---|
279 | * Asserts that an address is either NULL or inside the hypervisor memory area.
|
---|
280 | * This assertion only works while IN_RC, it's a NOP everywhere else.
|
---|
281 | * @thread The Emulation Thread.
|
---|
282 | */
|
---|
283 | #ifdef IN_RC
|
---|
284 | # define MMHYPER_RC_ASSERT_RCPTR(pVM, RCPtr) Assert(MMHyperIsInsideArea((pVM), (RTRCUINTPTR)(RCPtr)) || !(RCPtr))
|
---|
285 | #else
|
---|
286 | # define MMHYPER_RC_ASSERT_RCPTR(pVM, RCPtr) do { } while (0)
|
---|
287 | #endif
|
---|
288 |
|
---|
289 | /** @} */
|
---|
290 |
|
---|
291 |
|
---|
292 | #ifdef IN_RING3
|
---|
293 | /** @defgroup grp_mm_r3 The MM Host Context Ring-3 API
|
---|
294 | * @ingroup grp_mm
|
---|
295 | * @{
|
---|
296 | */
|
---|
297 |
|
---|
298 | VMMR3DECL(int) MMR3InitUVM(PUVM pUVM);
|
---|
299 | VMMR3DECL(int) MMR3Init(PVM pVM);
|
---|
300 | VMMR3DECL(int) MMR3InitPaging(PVM pVM);
|
---|
301 | VMMR3DECL(int) MMR3HyperInitFinalize(PVM pVM);
|
---|
302 | VMMR3DECL(int) MMR3Term(PVM pVM);
|
---|
303 | VMMR3DECL(void) MMR3TermUVM(PUVM pUVM);
|
---|
304 | VMMR3DECL(void) MMR3Reset(PVM pVM);
|
---|
305 | VMMR3DECL(int) MMR3IncreaseBaseReservation(PVM pVM, uint64_t cAddBasePages);
|
---|
306 | VMMR3DECL(int) MMR3AdjustFixedReservation(PVM pVM, int32_t cDeltaFixedPages, const char *pszDesc);
|
---|
307 | VMMR3DECL(int) MMR3UpdateShadowReservation(PVM pVM, uint32_t cShadowPages);
|
---|
308 |
|
---|
309 | VMMR3DECL(int) MMR3HCPhys2HCVirt(PVM pVM, RTHCPHYS HCPhys, void **ppv);
|
---|
310 | VMMR3DECL(int) MMR3ReadGCVirt(PVM pVM, void *pvDst, RTGCPTR GCPtr, size_t cb);
|
---|
311 | VMMR3DECL(int) MMR3WriteGCVirt(PVM pVM, RTGCPTR GCPtrDst, const void *pvSrc, size_t cb);
|
---|
312 |
|
---|
313 |
|
---|
314 | /** @defgroup grp_mm_r3_hyper Hypervisor Memory Manager (HC R3 Portion)
|
---|
315 | * @ingroup grp_mm_r3
|
---|
316 | * @{ */
|
---|
317 | VMMDECL(int) MMR3HyperAllocOnceNoRel(PVM pVM, size_t cb, uint32_t uAlignment, MMTAG enmTag, void **ppv);
|
---|
318 | VMMR3DECL(int) MMR3HyperMapHCPhys(PVM pVM, void *pvR3, RTR0PTR pvR0, RTHCPHYS HCPhys, size_t cb, const char *pszDesc, PRTGCPTR pGCPtr);
|
---|
319 | VMMR3DECL(int) MMR3HyperMapGCPhys(PVM pVM, RTGCPHYS GCPhys, size_t cb, const char *pszDesc, PRTGCPTR pGCPtr);
|
---|
320 | VMMR3DECL(int) MMR3HyperMapMMIO2(PVM pVM, PPDMDEVINS pDevIns, uint32_t iRegion, RTGCPHYS off, RTGCPHYS cb, const char *pszDesc, PRTRCPTR pRCPtr);
|
---|
321 | VMMR3DECL(int) MMR3HyperMapPages(PVM pVM, void *pvR3, RTR0PTR pvR0, size_t cPages, PCSUPPAGE paPages, const char *pszDesc, PRTGCPTR pGCPtr);
|
---|
322 | VMMR3DECL(int) MMR3HyperReserve(PVM pVM, unsigned cb, const char *pszDesc, PRTGCPTR pGCPtr);
|
---|
323 | VMMR3DECL(RTHCPHYS) MMR3HyperHCVirt2HCPhys(PVM pVM, void *pvHC);
|
---|
324 | VMMR3DECL(int) MMR3HyperHCVirt2HCPhysEx(PVM pVM, void *pvHC, PRTHCPHYS pHCPhys);
|
---|
325 | VMMR3DECL(void *) MMR3HyperHCPhys2HCVirt(PVM pVM, RTHCPHYS HCPhys);
|
---|
326 | VMMR3DECL(int) MMR3HyperHCPhys2HCVirtEx(PVM pVM, RTHCPHYS HCPhys, void **ppv);
|
---|
327 | VMMR3DECL(int) MMR3HyperReadGCVirt(PVM pVM, void *pvDst, RTGCPTR GCPtr, size_t cb);
|
---|
328 | /** @} */
|
---|
329 |
|
---|
330 |
|
---|
331 | /** @defgroup grp_mm_phys Guest Physical Memory Manager
|
---|
332 | * @ingroup grp_mm_r3
|
---|
333 | * @{ */
|
---|
334 | #ifndef VBOX_WITH_NEW_PHYS_CODE
|
---|
335 | VMMR3DECL(int) MMR3PhysRegisterEx(PVM pVM, void *pvRam, RTGCPHYS GCPhys, unsigned cb, unsigned fFlags, MMPHYSREG enmType, const char *pszDesc);
|
---|
336 | VMMR3DECL(int) MMR3PhysRomRegister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, const void *pvBinary, bool fShadow, const char *pszDesc);
|
---|
337 | VMMR3DECL(int) MMR3PhysRomProtect(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange);
|
---|
338 | VMMR3DECL(int) MMR3PhysReserve(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange, const char *pszDesc);
|
---|
339 | #endif
|
---|
340 | VMMR3DECL(uint64_t) MMR3PhysGetRamSize(PVM pVM);
|
---|
341 | /** @} */
|
---|
342 |
|
---|
343 |
|
---|
344 | /** @defgroup grp_mm_page Physical Page Pool
|
---|
345 | * @ingroup grp_mm_r3
|
---|
346 | * @{ */
|
---|
347 | VMMR3DECL(void *) MMR3PageAlloc(PVM pVM);
|
---|
348 | VMMR3DECL(RTHCPHYS) MMR3PageAllocPhys(PVM pVM);
|
---|
349 | VMMR3DECL(void) MMR3PageFree(PVM pVM, void *pvPage);
|
---|
350 | VMMR3DECL(void *) MMR3PageAllocLow(PVM pVM);
|
---|
351 | VMMR3DECL(void) MMR3PageFreeLow(PVM pVM, void *pvPage);
|
---|
352 | VMMR3DECL(void) MMR3PageFreeByPhys(PVM pVM, RTHCPHYS HCPhysPage);
|
---|
353 | VMMR3DECL(void *) MMR3PageDummyHCPtr(PVM pVM);
|
---|
354 | VMMR3DECL(RTHCPHYS) MMR3PageDummyHCPhys(PVM pVM);
|
---|
355 | /** @} */
|
---|
356 |
|
---|
357 |
|
---|
358 | /** @defgroup grp_mm_heap Heap Manager
|
---|
359 | * @ingroup grp_mm_r3
|
---|
360 | * @{ */
|
---|
361 | VMMR3DECL(void *) MMR3HeapAlloc(PVM pVM, MMTAG enmTag, size_t cbSize);
|
---|
362 | VMMR3DECL(void *) MMR3HeapAllocU(PUVM pUVM, MMTAG enmTag, size_t cbSize);
|
---|
363 | VMMR3DECL(int) MMR3HeapAllocEx(PVM pVM, MMTAG enmTag, size_t cbSize, void **ppv);
|
---|
364 | VMMR3DECL(int) MMR3HeapAllocExU(PUVM pUVM, MMTAG enmTag, size_t cbSize, void **ppv);
|
---|
365 | VMMR3DECL(void *) MMR3HeapAllocZ(PVM pVM, MMTAG enmTag, size_t cbSize);
|
---|
366 | VMMR3DECL(void *) MMR3HeapAllocZU(PUVM pUVM, MMTAG enmTag, size_t cbSize);
|
---|
367 | VMMR3DECL(int) MMR3HeapAllocZEx(PVM pVM, MMTAG enmTag, size_t cbSize, void **ppv);
|
---|
368 | VMMR3DECL(int) MMR3HeapAllocZExU(PUVM pUVM, MMTAG enmTag, size_t cbSize, void **ppv);
|
---|
369 | VMMR3DECL(void *) MMR3HeapRealloc(void *pv, size_t cbNewSize);
|
---|
370 | VMMR3DECL(char *) MMR3HeapStrDup(PVM pVM, MMTAG enmTag, const char *psz);
|
---|
371 | VMMR3DECL(char *) MMR3HeapStrDupU(PUVM pUVM, MMTAG enmTag, const char *psz);
|
---|
372 | VMMR3DECL(char *) MMR3HeapAPrintf(PVM pVM, MMTAG enmTag, const char *pszFormat, ...);
|
---|
373 | VMMR3DECL(char *) MMR3HeapAPrintfU(PUVM pUVM, MMTAG enmTag, const char *pszFormat, ...);
|
---|
374 | VMMR3DECL(char *) MMR3HeapAPrintfV(PVM pVM, MMTAG enmTag, const char *pszFormat, va_list va);
|
---|
375 | VMMR3DECL(char *) MMR3HeapAPrintfVU(PUVM pUVM, MMTAG enmTag, const char *pszFormat, va_list va);
|
---|
376 | VMMR3DECL(void) MMR3HeapFree(void *pv);
|
---|
377 | /** @} */
|
---|
378 |
|
---|
379 | /** @} */
|
---|
380 | #endif /* IN_RING3 */
|
---|
381 |
|
---|
382 |
|
---|
383 |
|
---|
384 | #ifdef IN_RC
|
---|
385 | /** @defgroup grp_mm_gc The MM Guest Context API
|
---|
386 | * @ingroup grp_mm
|
---|
387 | * @{
|
---|
388 | */
|
---|
389 |
|
---|
390 | VMMRCDECL(void) MMGCRamRegisterTrapHandler(PVM pVM);
|
---|
391 | VMMRCDECL(void) MMGCRamDeregisterTrapHandler(PVM pVM);
|
---|
392 | VMMRCDECL(int) MMGCRamReadNoTrapHandler(void *pDst, void *pSrc, size_t cb);
|
---|
393 | VMMRCDECL(int) MMGCRamWriteNoTrapHandler(void *pDst, void *pSrc, size_t cb);
|
---|
394 | VMMRCDECL(int) MMGCRamRead(PVM pVM, void *pDst, void *pSrc, size_t cb);
|
---|
395 | VMMRCDECL(int) MMGCRamWrite(PVM pVM, void *pDst, void *pSrc, size_t cb);
|
---|
396 |
|
---|
397 | /** @} */
|
---|
398 | #endif /* IN_RC */
|
---|
399 |
|
---|
400 | /** @} */
|
---|
401 | __END_DECLS
|
---|
402 |
|
---|
403 |
|
---|
404 | #endif
|
---|
405 |
|
---|