VirtualBox

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

最後變更 在這個檔案從80268是 80268,由 vboxsync 提交於 6 年 前

VMM: Refactoring VMMAll/* to use VMCC & VMMCPUCC. bugref:9217

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 19.9 KB
 
1/* $Id: MMAll.cpp 80268 2019-08-14 11:25:13Z vboxsync $ */
2/** @file
3 * MM - Memory Manager - Any Context.
4 */
5
6/*
7 * Copyright (C) 2006-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.alldomusa.eu.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 VBOX_BUGREF_9217_PART_I
23#define LOG_GROUP LOG_GROUP_MM_HYPER
24#include <VBox/vmm/mm.h>
25#include <VBox/vmm/vmm.h>
26#include "MMInternal.h"
27#include <VBox/vmm/vmcc.h>
28#include <VBox/vmm/hm.h>
29#include <VBox/log.h>
30#include <iprt/assert.h>
31#include <iprt/string.h>
32
33
34
35/**
36 * Lookup a host context ring-3 address.
37 *
38 * @returns Pointer to the corresponding lookup record.
39 * @returns NULL on failure.
40 * @param pVM The cross context VM structure.
41 * @param R3Ptr The host context ring-3 address to lookup.
42 * @param poff Where to store the offset into the HMA memory chunk.
43 */
44DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupR3(PVM pVM, RTR3PTR R3Ptr, uint32_t *poff)
45{
46 /** @todo cache last lookup, this stuff ain't cheap! */
47 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)((uint8_t *)pVM->mm.s.CTX_SUFF(pHyperHeap) + pVM->mm.s.offLookupHyper);
48 for (;;)
49 {
50 switch (pLookup->enmType)
51 {
52 case MMLOOKUPHYPERTYPE_LOCKED:
53 {
54 const RTR3UINTPTR off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.Locked.pvR3;
55 if (off < pLookup->cb)
56 {
57 *poff = off;
58 return pLookup;
59 }
60 break;
61 }
62
63 case MMLOOKUPHYPERTYPE_HCPHYS:
64 {
65 const RTR3UINTPTR off = (RTR3UINTPTR)R3Ptr - (RTR3UINTPTR)pLookup->u.HCPhys.pvR3;
66 if (off < pLookup->cb)
67 {
68 *poff = off;
69 return pLookup;
70 }
71 break;
72 }
73
74 case MMLOOKUPHYPERTYPE_GCPHYS: /* (for now we'll not allow these kind of conversions) */
75 case MMLOOKUPHYPERTYPE_MMIO2:
76 case MMLOOKUPHYPERTYPE_DYNAMIC:
77 break;
78
79 default:
80 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
81 break;
82 }
83
84 /* next */
85 if (pLookup->offNext == (int32_t)NIL_OFFSET)
86 break;
87 pLookup = (PMMLOOKUPHYPER)((uint8_t *)pLookup + pLookup->offNext);
88 }
89
90 AssertMsgFailed(("R3Ptr=%RHv is not inside the hypervisor memory area!\n", R3Ptr));
91 return NULL;
92}
93
94
95/**
96 * Lookup a host context ring-0 address.
97 *
98 * @returns Pointer to the corresponding lookup record.
99 * @returns NULL on failure.
100 * @param pVM The cross context VM structure.
101 * @param R0Ptr The host context ring-0 address to lookup.
102 * @param poff Where to store the offset into the HMA memory chunk.
103 */
104DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupR0(PVM pVM, RTR0PTR R0Ptr, uint32_t *poff)
105{
106 AssertCompile(sizeof(RTR0PTR) == sizeof(RTR3PTR));
107
108 /** @todo cache last lookup, this stuff ain't cheap! */
109 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)((uint8_t *)pVM->mm.s.CTX_SUFF(pHyperHeap) + pVM->mm.s.offLookupHyper);
110 for (;;)
111 {
112 switch (pLookup->enmType)
113 {
114 case MMLOOKUPHYPERTYPE_LOCKED:
115 {
116 const RTR0UINTPTR off = (RTR0UINTPTR)R0Ptr - (RTR0UINTPTR)pLookup->u.Locked.pvR0;
117 if (off < pLookup->cb && pLookup->u.Locked.pvR0)
118 {
119 *poff = off;
120 return pLookup;
121 }
122 break;
123 }
124
125 case MMLOOKUPHYPERTYPE_HCPHYS:
126 {
127 const RTR0UINTPTR off = (RTR0UINTPTR)R0Ptr - (RTR0UINTPTR)pLookup->u.HCPhys.pvR0;
128 if (off < pLookup->cb && pLookup->u.HCPhys.pvR0)
129 {
130 *poff = off;
131 return pLookup;
132 }
133 break;
134 }
135
136 case MMLOOKUPHYPERTYPE_GCPHYS: /* (for now we'll not allow these kind of conversions) */
137 case MMLOOKUPHYPERTYPE_MMIO2:
138 case MMLOOKUPHYPERTYPE_DYNAMIC:
139 break;
140
141 default:
142 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
143 break;
144 }
145
146 /* next */
147 if (pLookup->offNext == (int32_t)NIL_OFFSET)
148 break;
149 pLookup = (PMMLOOKUPHYPER)((uint8_t *)pLookup + pLookup->offNext);
150 }
151
152 AssertMsgFailed(("R0Ptr=%RHv is not inside the hypervisor memory area!\n", R0Ptr));
153 return NULL;
154}
155
156
157/**
158 * Lookup a raw-mode context address.
159 *
160 * @returns Pointer to the corresponding lookup record.
161 * @returns NULL on failure.
162 * @param pVM The cross context VM structure.
163 * @param RCPtr The raw-mode context address to lookup.
164 * @param poff Where to store the offset into the HMA memory chunk.
165 */
166DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupRC(PVM pVM, RTRCPTR RCPtr, uint32_t *poff)
167{
168 /** @todo cache last lookup this stuff ain't cheap! */
169 unsigned offRC = (RTRCUINTPTR)RCPtr - (RTGCUINTPTR)pVM->mm.s.pvHyperAreaGC;
170 PMMLOOKUPHYPER pLookup = (PMMLOOKUPHYPER)((uint8_t *)pVM->mm.s.CTX_SUFF(pHyperHeap) + pVM->mm.s.offLookupHyper);
171 for (;;)
172 {
173 const uint32_t off = offRC - pLookup->off;
174 if (off < pLookup->cb)
175 {
176 switch (pLookup->enmType)
177 {
178 case MMLOOKUPHYPERTYPE_LOCKED:
179 case MMLOOKUPHYPERTYPE_HCPHYS:
180 *poff = off;
181 return pLookup;
182 default:
183 break;
184 }
185 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
186 *poff = 0; /* shut up gcc */
187 return NULL;
188 }
189
190 /* next */
191 if (pLookup->offNext == (int32_t)NIL_OFFSET)
192 break;
193 pLookup = (PMMLOOKUPHYPER)((uint8_t *)pLookup + pLookup->offNext);
194 }
195
196 AssertMsgFailed(("RCPtr=%RRv is not inside the hypervisor memory area!\n", RCPtr));
197 *poff = 0; /* shut up gcc */
198 return NULL;
199}
200
201
202/**
203 * Lookup a current context address.
204 *
205 * @returns Pointer to the corresponding lookup record.
206 * @returns NULL on failure.
207 * @param pVM The cross context VM structure.
208 * @param pv The current context address to lookup.
209 * @param poff Where to store the offset into the HMA memory chunk.
210 */
211DECLINLINE(PMMLOOKUPHYPER) mmHyperLookupCC(PVM pVM, void *pv, uint32_t *poff)
212{
213#ifdef IN_RING0
214 return mmHyperLookupR0(pVM, pv, poff);
215#elif defined(IN_RING3)
216 return mmHyperLookupR3(pVM, pv, poff);
217#else
218# error "Neither IN_RING0 nor IN_RING3!"
219#endif
220}
221
222
223/**
224 * Calculate the host context ring-3 address of an offset into the HMA memory chunk.
225 *
226 * @returns the host context ring-3 address.
227 * @param pLookup The HMA lookup record.
228 * @param off The offset into the HMA memory chunk.
229 */
230DECLINLINE(RTR3PTR) mmHyperLookupCalcR3(PMMLOOKUPHYPER pLookup, uint32_t off)
231{
232 switch (pLookup->enmType)
233 {
234 case MMLOOKUPHYPERTYPE_LOCKED:
235 return (RTR3PTR)((RTR3UINTPTR)pLookup->u.Locked.pvR3 + off);
236 case MMLOOKUPHYPERTYPE_HCPHYS:
237 return (RTR3PTR)((RTR3UINTPTR)pLookup->u.HCPhys.pvR3 + off);
238 default:
239 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
240 return NIL_RTR3PTR;
241 }
242}
243
244
245/**
246 * Calculate the host context ring-0 address of an offset into the HMA memory chunk.
247 *
248 * @returns the host context ring-0 address.
249 * @param pVM The cross context VM structure.
250 * @param pLookup The HMA lookup record.
251 * @param off The offset into the HMA memory chunk.
252 */
253DECLINLINE(RTR0PTR) mmHyperLookupCalcR0(PVM pVM, PMMLOOKUPHYPER pLookup, uint32_t off)
254{
255 switch (pLookup->enmType)
256 {
257 case MMLOOKUPHYPERTYPE_LOCKED:
258 if (pLookup->u.Locked.pvR0)
259 return (RTR0PTR)((RTR0UINTPTR)pLookup->u.Locked.pvR0 + off);
260#ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
261 AssertMsg(VM_IS_RAW_MODE_ENABLED(pVM), ("%s\n", R3STRING(pLookup->pszDesc)));
262#else
263 AssertMsgFailed(("%s\n", R3STRING(pLookup->pszDesc))); NOREF(pVM);
264#endif
265 return NIL_RTR0PTR;
266
267 case MMLOOKUPHYPERTYPE_HCPHYS:
268 if (pLookup->u.HCPhys.pvR0)
269 return (RTR0PTR)((RTR0UINTPTR)pLookup->u.HCPhys.pvR0 + off);
270 AssertMsgFailed(("%s\n", R3STRING(pLookup->pszDesc)));
271 return NIL_RTR0PTR;
272
273 default:
274 AssertMsgFailed(("enmType=%d\n", pLookup->enmType));
275 return NIL_RTR0PTR;
276 }
277}
278
279
280/**
281 * Calculate the raw-mode context address of an offset into the HMA memory chunk.
282 *
283 * @returns the raw-mode context base address.
284 * @param pVM The cross context VM structure.
285 * @param pLookup The HMA lookup record.
286 * @param off The offset into the HMA memory chunk.
287 */
288DECLINLINE(RTRCPTR) mmHyperLookupCalcRC(PVM pVM, PMMLOOKUPHYPER pLookup, uint32_t off)
289{
290 return (RTRCPTR)((RTRCUINTPTR)pVM->mm.s.pvHyperAreaGC + pLookup->off + off);
291}
292
293
294/**
295 * Calculate the guest context address of an offset into the HMA memory chunk.
296 *
297 * @returns the guest context base address.
298 * @param pVM The cross context VM structure.
299 * @param pLookup The HMA lookup record.
300 * @param off The offset into the HMA memory chunk.
301 */
302DECLINLINE(void *) mmHyperLookupCalcCC(PVM pVM, PMMLOOKUPHYPER pLookup, uint32_t off)
303{
304#ifdef IN_RING0
305 return mmHyperLookupCalcR0(pVM, pLookup, off);
306#elif defined(IN_RING3)
307 NOREF(pVM);
308 return mmHyperLookupCalcR3(pLookup, off);
309#else
310# error "Neither IN_RING0 nor IN_RING3!"
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 cross context VM structure.
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 cross context VM structure.
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 cross context VM structure.
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 cross context VM structure.
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 cross context VM structure.
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 cross context VM structure.
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 cross context VM structure.
440 * @param RCPtr 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 cross context VM structure.
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
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 cross context VM structure.
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
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 cross context VM structure.
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 cross context VM structure.
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/**
534 * Converts a current context address in the Hypervisor memory region to a raw-mode context address.
535 *
536 * @returns guest context address.
537 * @param pVM The cross context VM structure.
538 * @param pv The current context address.
539 * You'll be damned if this is not in the HMA! :-)
540 * @thread The Emulation Thread.
541 */
542VMMDECL(RTRCPTR) MMHyperCCToRC(PVM pVM, void *pv)
543{
544 uint32_t off;
545 PMMLOOKUPHYPER pLookup = mmHyperLookupCC(pVM, pv, &off);
546 if (pLookup)
547 return mmHyperLookupCalcRC(pVM, pLookup, off);
548 return NIL_RTRCPTR;
549}
550
551
552/**
553 * Gets the string name of a memory tag.
554 *
555 * @returns name of enmTag.
556 * @param enmTag The tag.
557 */
558const char *mmGetTagName(MMTAG enmTag)
559{
560 switch (enmTag)
561 {
562 #define TAG2STR(tag) case MM_TAG_##tag: return #tag
563
564 TAG2STR(CFGM);
565 TAG2STR(CFGM_BYTES);
566 TAG2STR(CFGM_STRING);
567 TAG2STR(CFGM_USER);
568
569 TAG2STR(CPUM_CTX);
570 TAG2STR(CPUM_CPUID);
571 TAG2STR(CPUM_MSRS);
572
573 TAG2STR(CSAM);
574 TAG2STR(CSAM_PATCH);
575
576 TAG2STR(DBGF);
577 TAG2STR(DBGF_AS);
578 TAG2STR(DBGF_INFO);
579 TAG2STR(DBGF_LINE);
580 TAG2STR(DBGF_LINE_DUP);
581 TAG2STR(DBGF_MODULE);
582 TAG2STR(DBGF_OS);
583 TAG2STR(DBGF_REG);
584 TAG2STR(DBGF_STACK);
585 TAG2STR(DBGF_SYMBOL);
586 TAG2STR(DBGF_SYMBOL_DUP);
587 TAG2STR(DBGF_TYPE);
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
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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