VirtualBox

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

Last change on this file since 84458 was 84458, checked in by vboxsync, 5 years ago

VMM/DBGF: First commit of new tracing facility, bugref:9210

The new DBGF tracing facility allows efficient capturing of events to a compact binary
trace log for later analysis. It is primarily intended for recording device/guest
interactions for now but can be extended easily for other types of events later on.
It supports capturing events happening in both R0 and R3 by using a shared ring buffer
to post events to. The events are processed by a dedicated I/O thread which writes
new events into the binary trace log file.

This is only the core VMM/DBGF part providing the API, the integration with PDM
comes in a separate commit.

Disabled by default for now because it is still work in progress,
enable with VBOX_WITH_DBGF_TRACING.

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