VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMAll/MMAll.cpp@ 7802

Last change on this file since 7802 was 7635, checked in by vboxsync, 17 years ago

The new MMIO2 code.
WARNING! This changes the pci mapping protocol for MMIO2 so it's working the same way as I/O ports and normal MMIO memory. External users of the interface will have to update their mapping routines.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 19.6 KB
Line 
1/* $Id: MMAll.cpp 7635 2008-03-28 17:15:38Z vboxsync $ */
2/** @file
3 * MM - Memory Monitor(/Manager) - Any Context.
4 */
5
6/*
7 * Copyright (C) 2006-2007 innotek GmbH
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/*******************************************************************************
20* Header Files *
21*******************************************************************************/
22#define LOG_GROUP LOG_GROUP_MM_HYPER
23#include <VBox/mm.h>
24#include "MMInternal.h"
25#include <VBox/vm.h>
26#include <VBox/log.h>
27#include <iprt/assert.h>
28
29
30
31/**
32 * Lookup a host context ring-3 address.
33 *
34 * @returns Pointer to the corresponding lookup record.
35 * @returns NULL on failure.
36 * @param pVM The VM handle.
37 * @param R3Ptr The host context ring-3 address to lookup.
38 * @param poff Where to store the offset into the HMA memory chunk.
39 */
40DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupR3(PVM pVM, RTR3PTR R3Ptr, uint32_t *poff)
41{
42 /** @todo cache last lookup this stuff ain't cheap! */
43 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)((char*)CTXSUFF(pVM->mm.s.pHyperHeap) + pVM->mm.s.offLookupHyper);
44 for (;;)
45 {
46 switch (pLookup->enmType)
47 {
48 case MMLOOKUPHYPERTYPE_LOCKED:
49 {
50 const uint32_t off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.Locked.pvHC;
51 if (off < pLookup->cb)
52 {
53 *poff = off;
54 return pLookup;
55 }
56 break;
57 }
58
59 case MMLOOKUPHYPERTYPE_HCPHYS:
60 {
61 const uint32_t off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.HCPhys.pvHC;
62 if (off < pLookup->cb)
63 {
64 *poff = off;
65 return pLookup;
66 }
67 break;
68 }
69
70 case MMLOOKUPHYPERTYPE_GCPHYS: /* (for now we'll not allow these kind of conversions) */
71 case MMLOOKUPHYPERTYPE_MMIO2:
72 case MMLOOKUPHYPERTYPE_DYNAMIC:
73 break;
74
75 default:
76 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
77 break;
78 }
79
80 /* next */
81 if (pLookup->offNext == (int32_t)NIL_OFFSET)
82 break;
83 pLookup = (PMMLOOKUPHYPER)((char *)pLookup + pLookup->offNext);
84 }
85
86 AssertMsgFailed(("R3Ptr=%p is not inside the hypervisor memory area!\n", R3Ptr));
87 return NULL;
88}
89
90
91/**
92 * Lookup a host context ring-0 address.
93 *
94 * @returns Pointer to the corresponding lookup record.
95 * @returns NULL on failure.
96 * @param pVM The VM handle.
97 * @param R0Ptr The host context ring-0 address to lookup.
98 * @param poff Where to store the offset into the HMA memory chunk.
99 */
100DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupR0(PVM pVM, RTR0PTR R0Ptr, uint32_t *poff)
101{
102 AssertCompile(sizeof(RTR0PTR) == sizeof(RTR3PTR));
103
104 /*
105 * Translate Ring-0 VM addresses into Ring-3 VM addresses before feeding it to mmHyperLookupR3.
106 */
107 /** @todo fix this properly; the ring 0 pVM address differs from the R3 one. (#1865) */
108 RTR0UINTPTR offVM = (RTR0UINTPTR)R0Ptr - (RTR0UINTPTR)pVM->pVMR0;
109 RTR3PTR R3Ptr = offVM < sizeof(*pVM)
110 ? (RTR3PTR)((RTR3UINTPTR)pVM->pVMR3 + offVM)
111 : (RTR3PTR)R0Ptr;
112
113 return mmHyperLookupR3(pVM, R3Ptr, poff);
114}
115
116
117/**
118 * Lookup a guest context address.
119 *
120 * @returns Pointer to the corresponding lookup record.
121 * @returns NULL on failure.
122 * @param pVM The VM handle.
123 * @param GCPtr The guest context address to lookup.
124 * @param poff Where to store the offset into the HMA memory chunk.
125 */
126DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupGC(PVM pVM, RTGCPTR GCPtr, uint32_t *poff)
127{
128 /** @todo cache last lookup this stuff ain't cheap! */
129 unsigned offGC = (RTGCUINTPTR)GCPtr - (RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC;
130 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)((char*)CTXSUFF(pVM->mm.s.pHyperHeap) + pVM->mm.s.offLookupHyper);
131 for (;;)
132 {
133 const uint32_t off = offGC - pLookup->off;
134 if (off < pLookup->cb)
135 {
136 switch (pLookup->enmType)
137 {
138 case MMLOOKUPHYPERTYPE_LOCKED:
139 case MMLOOKUPHYPERTYPE_HCPHYS:
140 *poff = off;
141 return pLookup;
142 default:
143 break;
144 }
145 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
146 return NULL;
147 }
148
149 /* next */
150 if (pLookup->offNext == (int32_t)NIL_OFFSET)
151 break;
152 pLookup = (PMMLOOKUPHYPER)((char *)pLookup + pLookup->offNext);
153 }
154
155 AssertMsgFailed(("GCPtr=%p is not inside the hypervisor memory area!\n", GCPtr));
156 return NULL;
157}
158
159
160/**
161 * Lookup a current context address.
162 *
163 * @returns Pointer to the corresponding lookup record.
164 * @returns NULL on failure.
165 * @param pVM The VM handle.
166 * @param pv The current context address to lookup.
167 * @param poff Where to store the offset into the HMA memory chunk.
168 */
169DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupCC(PVM pVM, void *pv, uint32_t *poff)
170{
171#ifdef IN_GC
172 return mmHyperLookupGC(pVM, pv, poff);
173#elif defined(IN_RING0)
174 return mmHyperLookupR0(pVM, pv, poff);
175#else
176 return mmHyperLookupR3(pVM, pv, poff);
177#endif
178}
179
180
181/**
182 * Calculate the host context ring-3 address of an offset into the HMA memory chunk.
183 *
184 * @returns the host context ring-3 address.
185 * @param pLookup The HMA lookup record.
186 * @param off The offset into the HMA memory chunk.
187 */
188DECLINLINE(RTR3PTR) mmHyperLookupCalcR3(PMMLOOKUPHYPER pLookup, uint32_t off)
189{
190 switch (pLookup->enmType)
191 {
192 case MMLOOKUPHYPERTYPE_LOCKED:
193 return (RTR3PTR)((RTR3UINTPTR)pLookup->u.Locked.pvHC + off);
194 case MMLOOKUPHYPERTYPE_HCPHYS:
195 return (RTR3PTR)((RTR3UINTPTR)pLookup->u.HCPhys.pvHC + off);
196 default:
197 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
198 return NIL_RTR3PTR;
199 }
200}
201
202
203/**
204 * Calculate the host context ring-0 address of an offset into the HMA memory chunk.
205 *
206 * @returns the host context ring-0 address.
207 * @param pLookup The HMA lookup record.
208 * @param off The offset into the HMA memory chunk.
209 */
210DECLINLINE(RTR0PTR) mmHyperLookupCalcR0(PMMLOOKUPHYPER pLookup, uint32_t off)
211{
212 switch (pLookup->enmType)
213 {
214 case MMLOOKUPHYPERTYPE_LOCKED:
215 if (pLookup->u.Locked.pvR0)
216 return (RTR0PTR)((RTR0UINTPTR)pLookup->u.Locked.pvR0 + off);
217 return (RTR0PTR)((RTR3UINTPTR)pLookup->u.Locked.pvHC + off);
218 case MMLOOKUPHYPERTYPE_HCPHYS:
219 return (RTR0PTR)((RTR3UINTPTR)pLookup->u.HCPhys.pvHC + off);
220 default:
221 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
222 return NIL_RTR0PTR;
223 }
224}
225
226
227/**
228 * Calculate the guest context address of an offset into the HMA memory chunk.
229 *
230 * @returns the guest context base address.
231 * @param pVM The the VM handle.
232 * @param pLookup The HMA lookup record.
233 * @param off The offset into the HMA memory chunk.
234 */
235DECLINLINE(RTGCPTR) mmHyperLookupCalcGC(PVM pVM, PMMLOOKUPHYPER pLookup, uint32_t off)
236{
237 return (RTGCPTR)((RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC + pLookup->off + off);
238}
239
240
241/**
242 * Calculate the guest context address of an offset into the HMA memory chunk.
243 *
244 * @returns the guest context base address.
245 * @param pVM The the VM handle.
246 * @param pLookup The HMA lookup record.
247 * @param off The offset into the HMA memory chunk.
248 */
249DECLINLINE(void *) mmHyperLookupCalcCC(PVM pVM, PMMLOOKUPHYPER pLookup, uint32_t off)
250{
251#ifdef IN_GC
252 return mmHyperLookupCalcGC(pVM, pLookup, off);
253#elif defined(IN_RING0)
254 return mmHyperLookupCalcR0(pLookup, off);
255#else
256 return mmHyperLookupCalcR3(pLookup, off);
257#endif
258}
259
260
261/**
262 * Converts a ring-0 host context address in the Hypervisor memory region to a ring-3 host context address.
263 *
264 * @returns ring-3 host context address.
265 * @param pVM The VM to operate on.
266 * @param R0Ptr The ring-0 host context address.
267 * You'll be damned if this is not in the HMA! :-)
268 * @thread The Emulation Thread.
269 */
270MMDECL(RTR3PTR) MMHyperR0ToR3(PVM pVM, RTR0PTR R0Ptr)
271{
272 uint32_t off;
273 PMMLOOKUPHYPER pLookup = mmHyperLookupR0(pVM, R0Ptr, &off);
274 if (pLookup)
275 return mmHyperLookupCalcR3(pLookup, off);
276 return NIL_RTR3PTR;
277}
278
279
280/**
281 * Converts a ring-0 host context address in the Hypervisor memory region to a guest context address.
282 *
283 * @returns guest context address.
284 * @param pVM The VM to operate on.
285 * @param R0Ptr The ring-0 host context address.
286 * You'll be damned if this is not in the HMA! :-)
287 * @thread The Emulation Thread.
288 */
289MMDECL(RTGCPTR) MMHyperR0ToGC(PVM pVM, RTR0PTR R0Ptr)
290{
291 uint32_t off;
292 PMMLOOKUPHYPER pLookup = mmHyperLookupR0(pVM, R0Ptr, &off);
293 if (pLookup)
294 return mmHyperLookupCalcGC(pVM, pLookup, off);
295 return NIL_RTGCPTR;
296}
297
298
299#ifndef IN_RING0
300/**
301 * Converts a ring-0 host context address in the Hypervisor memory region to a current context address.
302 *
303 * @returns current context address.
304 * @param pVM The VM to operate on.
305 * @param R0Ptr The ring-0 host context address.
306 * You'll be damned if this is not in the HMA! :-)
307 * @thread The Emulation Thread.
308 */
309MMDECL(void *) MMHyperR0ToCC(PVM pVM, RTR0PTR R0Ptr)
310{
311 uint32_t off;
312 PMMLOOKUPHYPER pLookup = mmHyperLookupR0(pVM, R0Ptr, &off);
313 if (pLookup)
314 return mmHyperLookupCalcCC(pVM, pLookup, off);
315 return NULL;
316}
317#endif
318
319
320/**
321 * Converts a ring-3 host context address in the Hypervisor memory region to a ring-0 host context address.
322 *
323 * @returns ring-0 host context address.
324 * @param pVM The VM to operate on.
325 * @param R3Ptr The ring-3 host context address.
326 * You'll be damned if this is not in the HMA! :-)
327 * @thread The Emulation Thread.
328 */
329MMDECL(RTR0PTR) MMHyperR3ToR0(PVM pVM, RTR3PTR R3Ptr)
330{
331 uint32_t off;
332 PMMLOOKUPHYPER pLookup = mmHyperLookupR3(pVM, R3Ptr, &off);
333 if (pLookup)
334 return mmHyperLookupCalcR0(pLookup, off);
335 AssertMsgFailed(("R3Ptr=%p is not inside the hypervisor memory area!\n", R3Ptr));
336 return NIL_RTR0PTR;
337}
338
339
340/**
341 * Converts a ring-3 host context address in the Hypervisor memory region to a guest context address.
342 *
343 * @returns guest context address.
344 * @param pVM The VM to operate on.
345 * @param R3Ptr The ring-3 host context address.
346 * You'll be damned if this is not in the HMA! :-)
347 * @thread The Emulation Thread.
348 */
349MMDECL(RTGCPTR) MMHyperR3ToGC(PVM pVM, RTR3PTR R3Ptr)
350{
351 uint32_t off;
352 PMMLOOKUPHYPER pLookup = mmHyperLookupR3(pVM, R3Ptr, &off);
353 if (pLookup)
354 return mmHyperLookupCalcGC(pVM, pLookup, off);
355 AssertMsgFailed(("R3Ptr=%p is not inside the hypervisor memory area!\n", R3Ptr));
356 return NIL_RTGCPTR;
357}
358
359
360/**
361 * Converts a ring-3 host context address in the Hypervisor memory region to a current context address.
362 *
363 * @returns current context address.
364 * @param pVM The VM to operate on.
365 * @param R3Ptr The ring-3 host context address.
366 * You'll be damned if this is not in the HMA! :-)
367 * @thread The Emulation Thread.
368 */
369#ifndef IN_RING3
370MMDECL(void *) MMHyperR3ToCC(PVM pVM, RTR3PTR R3Ptr)
371{
372 uint32_t off;
373 PMMLOOKUPHYPER pLookup = mmHyperLookupR3(pVM, R3Ptr, &off);
374 if (pLookup)
375 return mmHyperLookupCalcCC(pVM, pLookup, off);
376 return NULL;
377}
378#endif
379
380
381/**
382 * Converts a guest context address in the Hypervisor memory region to a ring-3 context address.
383 *
384 * @returns ring-3 host context address.
385 * @param pVM The VM to operate on.
386 * @param GCPtr The guest context address.
387 * You'll be damned if this is not in the HMA! :-)
388 * @thread The Emulation Thread.
389 */
390MMDECL(RTR3PTR) MMHyperGCToR3(PVM pVM, RTGCPTR GCPtr)
391{
392 uint32_t off;
393 PMMLOOKUPHYPER pLookup = mmHyperLookupGC(pVM, GCPtr, &off);
394 if (pLookup)
395 return mmHyperLookupCalcR3(pLookup, off);
396 return NIL_RTR3PTR;
397}
398
399
400/**
401 * Converts a guest context address in the Hypervisor memory region to a ring-0 host context address.
402 *
403 * @returns ring-0 host context address.
404 * @param pVM The VM to operate on.
405 * @param GCPtr The guest context address.
406 * You'll be damned if this is not in the HMA! :-)
407 * @thread The Emulation Thread.
408 */
409MMDECL(RTR0PTR) MMHyperGCToR0(PVM pVM, RTGCPTR GCPtr)
410{
411 uint32_t off;
412 PMMLOOKUPHYPER pLookup = mmHyperLookupGC(pVM, GCPtr, &off);
413 if (pLookup)
414 return mmHyperLookupCalcR0(pLookup, off);
415 return NIL_RTR0PTR;
416}
417
418
419/**
420 * Converts a guest context address in the Hypervisor memory region to a current context address.
421 *
422 * @returns current context address.
423 * @param pVM The VM to operate on.
424 * @param GCPtr The guest host context address.
425 * You'll be damned if this is not in the HMA! :-)
426 * @thread The Emulation Thread.
427 */
428#ifndef IN_GC
429MMDECL(void *) MMHyperGCToCC(PVM pVM, RTGCPTR GCPtr)
430{
431 uint32_t off;
432 PMMLOOKUPHYPER pLookup = mmHyperLookupGC(pVM, GCPtr, &off);
433 if (pLookup)
434 return mmHyperLookupCalcCC(pVM, pLookup, off);
435 return NULL;
436}
437#endif
438
439
440
441/**
442 * Converts a current context address in the Hypervisor memory region to a ring-3 host context address.
443 *
444 * @returns ring-3 host context address.
445 * @param pVM The VM to operate on.
446 * @param pv The current context address.
447 * You'll be damned if this is not in the HMA! :-)
448 * @thread The Emulation Thread.
449 */
450#ifndef IN_RING3
451MMDECL(RTR3PTR) MMHyperCCToR3(PVM pVM, void *pv)
452{
453 uint32_t off;
454 PMMLOOKUPHYPER pLookup = mmHyperLookupCC(pVM, pv, &off);
455 if (pLookup)
456 return mmHyperLookupCalcR3(pLookup, off);
457 return NIL_RTR3PTR;
458}
459#endif
460
461/**
462 * Converts a current context address in the Hypervisor memory region to a ring-0 host context address.
463 *
464 * @returns ring-0 host context address.
465 * @param pVM The VM to operate on.
466 * @param pv The current context address.
467 * You'll be damned if this is not in the HMA! :-)
468 * @thread The Emulation Thread.
469 */
470#ifndef IN_RING0
471MMDECL(RTR0PTR) MMHyperCCToR0(PVM pVM, void *pv)
472{
473 uint32_t off;
474 PMMLOOKUPHYPER pLookup = mmHyperLookupCC(pVM, pv, &off);
475 if (pLookup)
476 return mmHyperLookupCalcR0(pLookup, off);
477 return NIL_RTR0PTR;
478}
479#endif
480
481
482/**
483 * Converts a current context address in the Hypervisor memory region to a guest context address.
484 *
485 * @returns guest context address.
486 * @param pVM The VM to operate on.
487 * @param pv The current context address.
488 * You'll be damned if this is not in the HMA! :-)
489 * @thread The Emulation Thread.
490 */
491#ifndef IN_GC
492MMDECL(RTGCPTR) MMHyperCCToGC(PVM pVM, void *pv)
493{
494 uint32_t off;
495 PMMLOOKUPHYPER pLookup = mmHyperLookupCC(pVM, pv, &off);
496 if (pLookup)
497 return mmHyperLookupCalcGC(pVM, pLookup, off);
498 return NIL_RTGCPTR;
499}
500#endif
501
502
503
504/**
505 * Converts a HC address in the Hypervisor memory region to a GC address.
506 * The memory must have been allocated with MMGCHyperAlloc() or MMR3HyperAlloc().
507 *
508 * @returns GC address.
509 * @param pVM The VM to operate on.
510 * @param HCPtr The host context address.
511 * You'll be damed if this is not in the hypervisor region! :-)
512 * @deprecated
513 */
514MMDECL(RTGCPTR) MMHyperHC2GC(PVM pVM, RTHCPTR HCPtr)
515{
516 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)((char*)CTXSUFF(pVM->mm.s.pHyperHeap) + pVM->mm.s.offLookupHyper);
517 for (;;)
518 {
519 switch (pLookup->enmType)
520 {
521 case MMLOOKUPHYPERTYPE_LOCKED:
522 {
523 unsigned off = (RTHCUINTPTR)HCPtr - (RTHCUINTPTR)pLookup->u.Locked.pvHC;
524 if (off < pLookup->cb)
525 return (RTGCPTR)((RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC + pLookup->off + off);
526 break;
527 }
528
529 case MMLOOKUPHYPERTYPE_HCPHYS:
530 {
531 unsigned off = (RTHCUINTPTR)HCPtr - (RTHCUINTPTR)pLookup->u.HCPhys.pvHC;
532 if (off < pLookup->cb)
533 return (RTGCPTR)((RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC + pLookup->off + off);
534 break;
535 }
536
537 case MMLOOKUPHYPERTYPE_GCPHYS: /* (for now we'll not allow these kind of conversions) */
538 case MMLOOKUPHYPERTYPE_MMIO2:
539 case MMLOOKUPHYPERTYPE_DYNAMIC:
540 break;
541
542 default:
543 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
544 break;
545 }
546
547 /* next */
548 if ((unsigned)pLookup->offNext == NIL_OFFSET)
549 break;
550 pLookup = (PMMLOOKUPHYPER)((char *)pLookup + pLookup->offNext);
551 }
552
553 AssertMsgFailed(("HCPtr=%p is not inside the hypervisor memory area!\n", HCPtr));
554 return (RTGCPTR)0;
555}
556
557
558/**
559 * Converts a GC address in the Hypervisor memory region to a HC address.
560 * The memory must have been allocated with MMHyperAlloc().
561 *
562 * @returns HC address.
563 * @param pVM The VM to operate on.
564 * @param GCPtr The guest context address.
565 * You'll be damed if this is not in the hypervisor region! :-)
566 * @deprecated
567 */
568MMDECL(RTHCPTR) MMHyperGC2HC(PVM pVM, RTGCPTR GCPtr)
569{
570 unsigned offGC = (RTGCUINTPTR)GCPtr - (RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC;
571 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)((char*)CTXSUFF(pVM->mm.s.pHyperHeap) + pVM->mm.s.offLookupHyper);
572 for (;;)
573 {
574 unsigned off = offGC - pLookup->off;
575 if (off < pLookup->cb)
576 {
577 switch (pLookup->enmType)
578 {
579 case MMLOOKUPHYPERTYPE_LOCKED:
580 return (RTHCPTR)((RTHCUINTPTR)pLookup->u.Locked.pvHC + off);
581 case MMLOOKUPHYPERTYPE_HCPHYS:
582 return (RTHCPTR)((RTHCUINTPTR)pLookup->u.HCPhys.pvHC + off);
583 default:
584 break;
585 }
586 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
587 return (RTHCPTR)0;
588 }
589
590 /* next */
591 if ((unsigned)pLookup->offNext == NIL_OFFSET)
592 break;
593 pLookup = (PMMLOOKUPHYPER)((char *)pLookup + pLookup->offNext);
594 }
595
596 AssertMsgFailed(("GCPtr=%p is not inside the hypervisor memory area!\n", GCPtr));
597 return (RTHCPTR)0;
598}
599
600
601#ifdef IN_GC
602/**
603 * Converts a current context address in the Hypervisor memory region to a HC address.
604 * The memory must have been allocated with MMGCHyperAlloc() or MMR3HyperAlloc().
605 *
606 * @returns HC address.
607 * @param pVM The VM to operate on.
608 * @param Ptr The current context address.
609 * @deprecated
610 */
611MMDECL(RTHCPTR) MMHyper2HC(PVM pVM, uintptr_t Ptr)
612{
613 return MMHyperGC2HC(pVM, (RTGCPTR)Ptr);
614}
615
616#else /* !IN_GC */
617
618/**
619 * Converts a current context address in the Hypervisor memory region to a GC address.
620 * The memory must have been allocated with MMHyperAlloc().
621 *
622 * @returns HC address.
623 * @param pVM The VM to operate on.
624 * @param Ptr The current context address.
625 * @thread The Emulation Thread.
626 * @deprecated
627 */
628MMDECL(RTGCPTR) MMHyper2GC(PVM pVM, uintptr_t Ptr)
629{
630 return MMHyperHC2GC(pVM, (RTHCPTR)Ptr);
631}
632
633#endif /* !IN_GC */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette