VirtualBox

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

Last change on this file since 26225 was 26225, checked in by vboxsync, 15 years ago

MMAll.cpp: Shut up gcc warning.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 19.3 KB
Line 
1/* $Id: MMAll.cpp 26225 2010-02-03 22:05:10Z vboxsync $ */
2/** @file
3 * MM - Memory Manager - Any Context.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.215389.xyz. 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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
20 */
21
22
23/*******************************************************************************
24* Header Files *
25*******************************************************************************/
26#define LOG_GROUP LOG_GROUP_MM_HYPER
27#include <VBox/mm.h>
28#include <VBox/vmm.h>
29#include "MMInternal.h"
30#include <VBox/vm.h>
31#include <VBox/log.h>
32#include <iprt/assert.h>
33#include <iprt/string.h>
34
35
36
37/**
38 * Lookup a host context ring-3 address.
39 *
40 * @returns Pointer to the corresponding lookup record.
41 * @returns NULL on failure.
42 * @param pVM The VM handle.
43 * @param R3Ptr The host context ring-3 address to lookup.
44 * @param poff Where to store the offset into the HMA memory chunk.
45 */
46DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupR3(PVM pVM, RTR3PTR R3Ptr, uint32_t *poff)
47{
48 /** @todo cache last lookup, this stuff ain't cheap! */
49 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)((uint8_t *)pVM->mm.s.CTX_SUFF(pHyperHeap) + pVM->mm.s.offLookupHyper);
50 for (;;)
51 {
52 switch (pLookup->enmType)
53 {
54 case MMLOOKUPHYPERTYPE_LOCKED:
55 {
56 const RTR3UINTPTR off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.Locked.pvR3;
57 if (off < pLookup->cb)
58 {
59 *poff = off;
60 return pLookup;
61 }
62 break;
63 }
64
65 case MMLOOKUPHYPERTYPE_HCPHYS:
66 {
67 const RTR3UINTPTR off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.HCPhys.pvR3;
68 if (off < pLookup->cb)
69 {
70 *poff = off;
71 return pLookup;
72 }
73 break;
74 }
75
76 case MMLOOKUPHYPERTYPE_GCPHYS: /* (for now we'll not allow these kind of conversions) */
77 case MMLOOKUPHYPERTYPE_MMIO2:
78 case MMLOOKUPHYPERTYPE_DYNAMIC:
79 break;
80
81 default:
82 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
83 break;
84 }
85
86 /* next */
87 if (pLookup->offNext == (int32_t)NIL_OFFSET)
88 break;
89 pLookup = (PMMLOOKUPHYPER)((uint8_t *)pLookup + pLookup->offNext);
90 }
91
92 AssertMsgFailed(("R3Ptr=%RHv is not inside the hypervisor memory area!\n", R3Ptr));
93 return NULL;
94}
95
96
97/**
98 * Lookup a host context ring-0 address.
99 *
100 * @returns Pointer to the corresponding lookup record.
101 * @returns NULL on failure.
102 * @param pVM The VM handle.
103 * @param R0Ptr The host context ring-0 address to lookup.
104 * @param poff Where to store the offset into the HMA memory chunk.
105 */
106DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupR0(PVM pVM, RTR0PTR R0Ptr, uint32_t *poff)
107{
108 AssertCompile(sizeof(RTR0PTR) == sizeof(RTR3PTR));
109
110 /** @todo cache last lookup, this stuff ain't cheap! */
111 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)((uint8_t *)pVM->mm.s.CTX_SUFF(pHyperHeap) + pVM->mm.s.offLookupHyper);
112 for (;;)
113 {
114 switch (pLookup->enmType)
115 {
116 case MMLOOKUPHYPERTYPE_LOCKED:
117 {
118 const RTR0UINTPTR off = (RTR0UINTPTR)R0Ptr - (RTR0UINTPTR)pLookup->u.Locked.pvR0;
119 if (off < pLookup->cb && pLookup->u.Locked.pvR0)
120 {
121 *poff = off;
122 return pLookup;
123 }
124 break;
125 }
126
127 case MMLOOKUPHYPERTYPE_HCPHYS:
128 {
129 const RTR0UINTPTR off = (RTR0UINTPTR)R0Ptr - (RTR0UINTPTR)pLookup->u.HCPhys.pvR0;
130 if (off < pLookup->cb && pLookup->u.HCPhys.pvR0)
131 {
132 *poff = off;
133 return pLookup;
134 }
135 break;
136 }
137
138 case MMLOOKUPHYPERTYPE_GCPHYS: /* (for now we'll not allow these kind of conversions) */
139 case MMLOOKUPHYPERTYPE_MMIO2:
140 case MMLOOKUPHYPERTYPE_DYNAMIC:
141 break;
142
143 default:
144 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
145 break;
146 }
147
148 /* next */
149 if (pLookup->offNext == (int32_t)NIL_OFFSET)
150 break;
151 pLookup = (PMMLOOKUPHYPER)((uint8_t *)pLookup + pLookup->offNext);
152 }
153
154 AssertMsgFailed(("R0Ptr=%RHv is not inside the hypervisor memory area!\n", R0Ptr));
155 return NULL;
156}
157
158
159/**
160 * Lookup a raw-mode context address.
161 *
162 * @returns Pointer to the corresponding lookup record.
163 * @returns NULL on failure.
164 * @param pVM The VM handle.
165 * @param RCPtr The raw-mode context address to lookup.
166 * @param poff Where to store the offset into the HMA memory chunk.
167 */
168DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupRC(PVM pVM, RTRCPTR RCPtr, uint32_t *poff)
169{
170 /** @todo cache last lookup this stuff ain't cheap! */
171 unsigned offRC = (RTRCUINTPTR)RCPtr - (RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC;
172 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)((uint8_t *)pVM->mm.s.CTX_SUFF(pHyperHeap) + pVM->mm.s.offLookupHyper);
173 for (;;)
174 {
175 const uint32_t off = offRC - pLookup->off;
176 if (off < pLookup->cb)
177 {
178 switch (pLookup->enmType)
179 {
180 case MMLOOKUPHYPERTYPE_LOCKED:
181 case MMLOOKUPHYPERTYPE_HCPHYS:
182 *poff = off;
183 return pLookup;
184 default:
185 break;
186 }
187 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
188 return NULL;
189 }
190
191 /* next */
192 if (pLookup->offNext == (int32_t)NIL_OFFSET)
193 break;
194 pLookup = (PMMLOOKUPHYPER)((uint8_t *)pLookup + pLookup->offNext);
195 }
196
197 AssertMsgFailed(("RCPtr=%RRv is not inside the hypervisor memory area!\n", RCPtr));
198 *poff = 0; /* shut up gcc */
199 return NULL;
200}
201
202
203/**
204 * Lookup a current context address.
205 *
206 * @returns Pointer to the corresponding lookup record.
207 * @returns NULL on failure.
208 * @param pVM The VM handle.
209 * @param pv The current context address to lookup.
210 * @param poff Where to store the offset into the HMA memory chunk.
211 */
212DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupCC(PVM pVM, void *pv, uint32_t *poff)
213{
214#ifdef IN_RC
215 return mmHyperLookupRC(pVM, (RTRCPTR)pv, poff);
216#elif defined(IN_RING0)
217 return mmHyperLookupR0(pVM, pv, poff);
218#else
219 return mmHyperLookupR3(pVM, pv, poff);
220#endif
221}
222
223
224/**
225 * Calculate the host context ring-3 address of an offset into the HMA memory chunk.
226 *
227 * @returns the host context ring-3 address.
228 * @param pLookup The HMA lookup record.
229 * @param off The offset into the HMA memory chunk.
230 */
231DECLINLINE(RTR3PTR) mmHyperLookupCalcR3(PMMLOOKUPHYPER pLookup, uint32_t off)
232{
233 switch (pLookup->enmType)
234 {
235 case MMLOOKUPHYPERTYPE_LOCKED:
236 return (RTR3PTR)((RTR3UINTPTR)pLookup->u.Locked.pvR3 + off);
237 case MMLOOKUPHYPERTYPE_HCPHYS:
238 return (RTR3PTR)((RTR3UINTPTR)pLookup->u.HCPhys.pvR3 + off);
239 default:
240 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
241 return NIL_RTR3PTR;
242 }
243}
244
245
246/**
247 * Calculate the host context ring-0 address of an offset into the HMA memory chunk.
248 *
249 * @returns the host context ring-0 address.
250 * @param pVM Pointer to the shared VM structure.
251 * @param pLookup The HMA lookup record.
252 * @param off The offset into the HMA memory chunk.
253 */
254DECLINLINE(RTR0PTR) mmHyperLookupCalcR0(PVM pVM, PMMLOOKUPHYPER pLookup, uint32_t off)
255{
256 switch (pLookup->enmType)
257 {
258 case MMLOOKUPHYPERTYPE_LOCKED:
259 if (pLookup->u.Locked.pvR0)
260 return (RTR0PTR)((RTR0UINTPTR)pLookup->u.Locked.pvR0 + off);
261#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
262 AssertMsg(!VMMIsHwVirtExtForced(pVM), ("%s\n", R3STRING(pLookup->pszDesc)));
263#else
264 AssertMsgFailed(("%s\n", R3STRING(pLookup->pszDesc)));
265#endif
266 return NIL_RTR0PTR;
267
268 case MMLOOKUPHYPERTYPE_HCPHYS:
269 if (pLookup->u.HCPhys.pvR0)
270 return (RTR0PTR)((RTR0UINTPTR)pLookup->u.HCPhys.pvR0 + off);
271 AssertMsgFailed(("%s\n", R3STRING(pLookup->pszDesc)));
272 return NIL_RTR0PTR;
273
274 default:
275 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
276 return NIL_RTR0PTR;
277 }
278}
279
280
281/**
282 * Calculate the raw-mode context address of an offset into the HMA memory chunk.
283 *
284 * @returns the raw-mode context base address.
285 * @param pVM The the VM handle.
286 * @param pLookup The HMA lookup record.
287 * @param off The offset into the HMA memory chunk.
288 */
289DECLINLINE(RTRCPTR) mmHyperLookupCalcRC(PVM pVM, PMMLOOKUPHYPER pLookup, uint32_t off)
290{
291 return (RTRCPTR)((RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC + pLookup->off + off);
292}
293
294
295/**
296 * Calculate the guest context address of an offset into the HMA memory chunk.
297 *
298 * @returns the guest context base address.
299 * @param pVM The the VM handle.
300 * @param pLookup The HMA lookup record.
301 * @param off The offset into the HMA memory chunk.
302 */
303DECLINLINE(void *) mmHyperLookupCalcCC(PVM pVM, PMMLOOKUPHYPER pLookup, uint32_t off)
304{
305#ifdef IN_RC
306 return (void *)mmHyperLookupCalcRC(pVM, pLookup, off);
307#elif defined(IN_RING0)
308 return mmHyperLookupCalcR0(pVM, pLookup, off);
309#else
310 return mmHyperLookupCalcR3(pLookup, off);
311#endif
312}
313
314
315/**
316 * Converts a ring-0 host context address in the Hypervisor memory region to a ring-3 host context address.
317 *
318 * @returns ring-3 host context address.
319 * @param pVM The VM to operate on.
320 * @param R0Ptr The ring-0 host context address.
321 * You'll be damned if this is not in the HMA! :-)
322 * @thread The Emulation Thread.
323 */
324VMMDECL(RTR3PTR) MMHyperR0ToR3(PVM pVM, RTR0PTR R0Ptr)
325{
326 uint32_t off;
327 PMMLOOKUPHYPER pLookup = mmHyperLookupR0(pVM, R0Ptr, &off);
328 if (pLookup)
329 return mmHyperLookupCalcR3(pLookup, off);
330 return NIL_RTR3PTR;
331}
332
333
334/**
335 * Converts a ring-0 host context address in the Hypervisor memory region to a raw-mode context address.
336 *
337 * @returns raw-mode context address.
338 * @param pVM The VM to operate on.
339 * @param R0Ptr The ring-0 host context address.
340 * You'll be damned if this is not in the HMA! :-)
341 * @thread The Emulation Thread.
342 */
343VMMDECL(RTRCPTR) MMHyperR0ToRC(PVM pVM, RTR0PTR R0Ptr)
344{
345 uint32_t off;
346 PMMLOOKUPHYPER pLookup = mmHyperLookupR0(pVM, R0Ptr, &off);
347 if (pLookup)
348 return mmHyperLookupCalcRC(pVM, pLookup, off);
349 return NIL_RTRCPTR;
350}
351
352
353#ifndef IN_RING0
354/**
355 * Converts a ring-0 host context address in the Hypervisor memory region to a current context address.
356 *
357 * @returns current context address.
358 * @param pVM The VM to operate on.
359 * @param R0Ptr The ring-0 host context address.
360 * You'll be damned if this is not in the HMA! :-)
361 * @thread The Emulation Thread.
362 */
363VMMDECL(void *) MMHyperR0ToCC(PVM pVM, RTR0PTR R0Ptr)
364{
365 uint32_t off;
366 PMMLOOKUPHYPER pLookup = mmHyperLookupR0(pVM, R0Ptr, &off);
367 if (pLookup)
368 return mmHyperLookupCalcCC(pVM, pLookup, off);
369 return NULL;
370}
371#endif
372
373
374/**
375 * Converts a ring-3 host context address in the Hypervisor memory region to a ring-0 host context address.
376 *
377 * @returns ring-0 host context address.
378 * @param pVM The VM to operate on.
379 * @param R3Ptr The ring-3 host context address.
380 * You'll be damned if this is not in the HMA! :-)
381 * @thread The Emulation Thread.
382 */
383VMMDECL(RTR0PTR) MMHyperR3ToR0(PVM pVM, RTR3PTR R3Ptr)
384{
385 uint32_t off;
386 PMMLOOKUPHYPER pLookup = mmHyperLookupR3(pVM, R3Ptr, &off);
387 if (pLookup)
388 return mmHyperLookupCalcR0(pVM, pLookup, off);
389 AssertMsgFailed(("R3Ptr=%p is not inside the hypervisor memory area!\n", R3Ptr));
390 return NIL_RTR0PTR;
391}
392
393
394/**
395 * Converts a ring-3 host context address in the Hypervisor memory region to a guest context address.
396 *
397 * @returns guest context address.
398 * @param pVM The VM to operate on.
399 * @param R3Ptr The ring-3 host context address.
400 * You'll be damned if this is not in the HMA! :-)
401 * @thread The Emulation Thread.
402 */
403VMMDECL(RTRCPTR) MMHyperR3ToRC(PVM pVM, RTR3PTR R3Ptr)
404{
405 uint32_t off;
406 PMMLOOKUPHYPER pLookup = mmHyperLookupR3(pVM, R3Ptr, &off);
407 if (pLookup)
408 return mmHyperLookupCalcRC(pVM, pLookup, off);
409 AssertMsgFailed(("R3Ptr=%p is not inside the hypervisor memory area!\n", R3Ptr));
410 return NIL_RTRCPTR;
411}
412
413
414#ifndef IN_RING3
415/**
416 * Converts a ring-3 host context address in the Hypervisor memory region to a current context address.
417 *
418 * @returns current context address.
419 * @param pVM The VM to operate on.
420 * @param R3Ptr The ring-3 host context address.
421 * You'll be damned if this is not in the HMA! :-)
422 * @thread The Emulation Thread.
423 */
424VMMDECL(void *) MMHyperR3ToCC(PVM pVM, RTR3PTR R3Ptr)
425{
426 uint32_t off;
427 PMMLOOKUPHYPER pLookup = mmHyperLookupR3(pVM, R3Ptr, &off);
428 if (pLookup)
429 return mmHyperLookupCalcCC(pVM, pLookup, off);
430 return NULL;
431}
432#endif
433
434
435/**
436 * Converts a raw-mode context address in the Hypervisor memory region to a ring-3 context address.
437 *
438 * @returns ring-3 host context address.
439 * @param pVM The VM to operate on.
440 * @param GCPtr The raw-mode context address.
441 * You'll be damned if this is not in the HMA! :-)
442 * @thread The Emulation Thread.
443 */
444VMMDECL(RTR3PTR) MMHyperRCToR3(PVM pVM, RTRCPTR RCPtr)
445{
446 uint32_t off;
447 PMMLOOKUPHYPER pLookup = mmHyperLookupRC(pVM, RCPtr, &off);
448 if (pLookup)
449 return mmHyperLookupCalcR3(pLookup, off);
450 return NIL_RTR3PTR;
451}
452
453
454/**
455 * Converts a raw-mode context address in the Hypervisor memory region to a ring-0 host context address.
456 *
457 * @returns ring-0 host context address.
458 * @param pVM The VM to operate on.
459 * @param RCPtr The raw-mode context address.
460 * You'll be damned if this is not in the HMA! :-)
461 * @thread The Emulation Thread.
462 */
463VMMDECL(RTR0PTR) MMHyperRCToR0(PVM pVM, RTRCPTR RCPtr)
464{
465 uint32_t off;
466 PMMLOOKUPHYPER pLookup = mmHyperLookupRC(pVM, RCPtr, &off);
467 if (pLookup)
468 return mmHyperLookupCalcR0(pVM, pLookup, off);
469 return NIL_RTR0PTR;
470}
471
472#ifndef IN_RC
473/**
474 * Converts a raw-mode context address in the Hypervisor memory region to a current context address.
475 *
476 * @returns current context address.
477 * @param pVM The VM to operate on.
478 * @param RCPtr The raw-mode host context address.
479 * You'll be damned if this is not in the HMA! :-)
480 * @thread The Emulation Thread.
481 */
482VMMDECL(void *) MMHyperRCToCC(PVM pVM, RTRCPTR RCPtr)
483{
484 uint32_t off;
485 PMMLOOKUPHYPER pLookup = mmHyperLookupRC(pVM, RCPtr, &off);
486 if (pLookup)
487 return mmHyperLookupCalcCC(pVM, pLookup, off);
488 return NULL;
489}
490#endif
491
492#ifndef IN_RING3
493/**
494 * Converts a current context address in the Hypervisor memory region to a ring-3 host context address.
495 *
496 * @returns ring-3 host context address.
497 * @param pVM The VM to operate on.
498 * @param pv The current context address.
499 * You'll be damned if this is not in the HMA! :-)
500 * @thread The Emulation Thread.
501 */
502VMMDECL(RTR3PTR) MMHyperCCToR3(PVM pVM, void *pv)
503{
504 uint32_t off;
505 PMMLOOKUPHYPER pLookup = mmHyperLookupCC(pVM, pv, &off);
506 if (pLookup)
507 return mmHyperLookupCalcR3(pLookup, off);
508 return NIL_RTR3PTR;
509}
510#endif
511
512#ifndef IN_RING0
513/**
514 * Converts a current context address in the Hypervisor memory region to a ring-0 host context address.
515 *
516 * @returns ring-0 host context address.
517 * @param pVM The VM to operate on.
518 * @param pv The current context address.
519 * You'll be damned if this is not in the HMA! :-)
520 * @thread The Emulation Thread.
521 */
522VMMDECL(RTR0PTR) MMHyperCCToR0(PVM pVM, void *pv)
523{
524 uint32_t off;
525 PMMLOOKUPHYPER pLookup = mmHyperLookupCC(pVM, pv, &off);
526 if (pLookup)
527 return mmHyperLookupCalcR0(pVM, pLookup, off);
528 return NIL_RTR0PTR;
529}
530#endif
531
532
533#ifndef IN_RC
534/**
535 * Converts a current context address in the Hypervisor memory region to a raw-mode context address.
536 *
537 * @returns guest context address.
538 * @param pVM The VM to operate on.
539 * @param pv The current context address.
540 * You'll be damned if this is not in the HMA! :-)
541 * @thread The Emulation Thread.
542 */
543VMMDECL(RTRCPTR) MMHyperCCToRC(PVM pVM, void *pv)
544{
545 uint32_t off;
546 PMMLOOKUPHYPER pLookup = mmHyperLookupCC(pVM, pv, &off);
547 if (pLookup)
548 return mmHyperLookupCalcRC(pVM, pLookup, off);
549 return NIL_RTRCPTR;
550}
551#endif
552
553
554/**
555 * Gets the string name of a memory tag.
556 *
557 * @returns name of enmTag.
558 * @param enmTag The tag.
559 */
560const char *mmGetTagName(MMTAG enmTag)
561{
562 switch (enmTag)
563 {
564 #define TAG2STR(tag) case MM_TAG_##tag: return #tag
565
566 TAG2STR(CFGM);
567 TAG2STR(CFGM_BYTES);
568 TAG2STR(CFGM_STRING);
569 TAG2STR(CFGM_USER);
570
571 TAG2STR(CSAM);
572 TAG2STR(CSAM_PATCH);
573
574 TAG2STR(DBGF);
575 TAG2STR(DBGF_AS);
576 TAG2STR(DBGF_INFO);
577 TAG2STR(DBGF_LINE);
578 TAG2STR(DBGF_LINE_DUP);
579 TAG2STR(DBGF_MODULE);
580 TAG2STR(DBGF_OS);
581 TAG2STR(DBGF_STACK);
582 TAG2STR(DBGF_SYMBOL);
583 TAG2STR(DBGF_SYMBOL_DUP);
584
585 TAG2STR(EM);
586
587 TAG2STR(IOM);
588 TAG2STR(IOM_STATS);
589
590 TAG2STR(MM);
591 TAG2STR(MM_LOOKUP_GUEST);
592 TAG2STR(MM_LOOKUP_PHYS);
593 TAG2STR(MM_LOOKUP_VIRT);
594 TAG2STR(MM_PAGE);
595
596 TAG2STR(PARAV);
597
598 TAG2STR(PATM);
599 TAG2STR(PATM_PATCH);
600
601 TAG2STR(PDM);
602 TAG2STR(PDM_DEVICE);
603 TAG2STR(PDM_DEVICE_DESC);
604 TAG2STR(PDM_DEVICE_USER);
605 TAG2STR(PDM_DRIVER);
606 TAG2STR(PDM_DRIVER_DESC);
607 TAG2STR(PDM_DRIVER_USER);
608 TAG2STR(PDM_USB);
609 TAG2STR(PDM_USB_DESC);
610 TAG2STR(PDM_USB_USER);
611 TAG2STR(PDM_LUN);
612 TAG2STR(PDM_QUEUE);
613 TAG2STR(PDM_THREAD);
614 TAG2STR(PDM_ASYNC_COMPLETION);
615
616 TAG2STR(PGM);
617 TAG2STR(PGM_CHUNK_MAPPING);
618 TAG2STR(PGM_HANDLERS);
619 TAG2STR(PGM_MAPPINGS);
620 TAG2STR(PGM_PHYS);
621 TAG2STR(PGM_POOL);
622
623 TAG2STR(REM);
624
625 TAG2STR(SELM);
626
627 TAG2STR(SSM);
628
629 TAG2STR(STAM);
630
631 TAG2STR(TM);
632
633 TAG2STR(TRPM);
634
635 TAG2STR(VM);
636 TAG2STR(VM_REQ);
637
638 TAG2STR(VMM);
639
640 TAG2STR(HWACCM);
641
642 #undef TAG2STR
643
644 default:
645 {
646 AssertMsgFailed(("Unknown tag %d! forgot to add it to the switch?\n", enmTag));
647#ifdef IN_RING3
648 static char sz[48];
649 RTStrPrintf(sz, sizeof(sz), "%d", enmTag);
650 return sz;
651#else
652 return "unknown tag!";
653#endif
654 }
655 }
656}
657
Note: See TracBrowser for help on using the repository browser.

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