Changeset 61566 in vbox for trunk/src/VBox
- Timestamp:
- Jun 8, 2016 9:39:35 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/APIC.cpp
r61556 r61566 405 405 * Dumps basic APIC state. 406 406 * 407 * @param pVCpu The cross context virtual CPU structure. 408 * @param pHlp The debug output helper. 409 */ 410 static void apicR3DbgInfoBasic(PVMCPU pVCpu, PCDBGFINFOHLP pHlp) 411 { 407 * @param pVCpu The cross context virtual CPU structure. 408 * @param pHlp The info helpers. 409 * @param pszArgs Arguments, ignored. 410 */ 411 static DECLCALLBACK(void) apicR3Info(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 412 { 413 NOREF(pszArgs); 414 PVMCPU pVCpu = VMMGetCpu(pVM); AssertFatalMsg(pVCpu, ("Invalid EMT thread. pVCpu=%p\n", pVCpu)); 412 415 PCAPICCPU pApicCpu = VMCPU_TO_APICCPU(pVCpu); 413 416 PCXAPICPAGE pXApicPage = VMCPU_TO_CXAPICPAGE(pVCpu); … … 499 502 * @param pHlp The debug output helper. 500 503 */ 501 static void apicR3 DbgInfoLvtTimer(PVMCPU pVCpu, PCDBGFINFOHLP pHlp)504 static void apicR3InfoLvtTimer(PVMCPU pVCpu, PCDBGFINFOHLP pHlp) 502 505 { 503 506 PCXAPICPAGE pXApicPage = VMCPU_TO_CXAPICPAGE(pVCpu); … … 514 517 515 518 /** 516 * Dumps APIC Local Vector Table (LVT) state. 517 * 518 * @param pVCpu The cross context virtual CPU structure. 519 * @param pHlp The debug output helper. 520 */ 521 static void apicR3DbgInfoLvt(PVMCPU pVCpu, PCDBGFINFOHLP pHlp) 522 { 519 * Dumps APIC Local Vector Table (LVT) information. 520 * 521 * @param pVCpu The cross context virtual CPU structure. 522 * @param pHlp The info helpers. 523 * @param pszArgs Arguments, ignored. 524 */ 525 static DECLCALLBACK(void) apicR3InfoLvt(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 526 { 527 NOREF(pszArgs); 528 PVMCPU pVCpu = VMMGetCpu(pVM); AssertFatalMsg(pVCpu, ("Invalid EMT thread. pVCpu=%p\n", pVCpu)); 523 529 PCXAPICPAGE pXApicPage = VMCPU_TO_CXAPICPAGE(pVCpu); 524 530 525 apicR3 DbgInfoLvtTimer(pVCpu, pHlp);531 apicR3InfoLvtTimer(pVCpu, pHlp); 526 532 527 533 #if XAPIC_HARDWARE_VERSION == XAPIC_HARDWARE_VERSION_P4 … … 582 588 583 589 /** 584 * Dumps APIC Timer state. 585 * 586 * @param pVCpu The cross context virtual CPU structure. 587 * @param pHlp The debug output helper. 588 */ 589 static void apicR3DbgInfoTimer(PVMCPU pVCpu, PCDBGFINFOHLP pHlp) 590 { 590 * Dumps the APIC timer information. 591 * 592 * @param pVCpu The cross context virtual CPU structure. 593 * @param pHlp The info helpers. 594 * @param pszArgs Arguments, ignored. 595 */ 596 static DECLCALLBACK(void) apicR3InfoTimer(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 597 { 598 NOREF(pszArgs); 599 PVMCPU pVCpu = VMMGetCpu(pVM); AssertFatalMsg(pVCpu, ("Invalid EMT thread. pVCpu=%p\n", pVCpu)); 591 600 PCXAPICPAGE pXApicPage = VMCPU_TO_CXAPICPAGE(pVCpu); 592 601 PCAPICCPU pApicCpu = VMCPU_TO_APICCPU(pVCpu); … … 600 609 pHlp->pfnPrintf(pHlp, "\n"); 601 610 602 apicR3DbgInfoLvtTimer(pVCpu, pHlp); 603 } 604 605 606 /** 607 * @callback_method_impl{FNDBGFHANDLERDEV, 608 * Dumps the APIC state according to given argument for debugging purposes.} 609 */ 610 static DECLCALLBACK(void) apicR3DbgInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs) 611 { 612 PVM pVM = PDMDevHlpGetVM(pDevIns); 613 PVMCPU pVCpu = VMMGetCpu(pVM); 614 Assert(pVCpu); 615 616 if (pszArgs == NULL || !*pszArgs || !strcmp(pszArgs, "basic")) 617 apicR3DbgInfoBasic(pVCpu, pHlp); 618 else if (!strcmp(pszArgs, "lvt")) 619 apicR3DbgInfoLvt(pVCpu, pHlp); 620 else if (!strcmp(pszArgs, "timer")) 621 apicR3DbgInfoTimer(pVCpu, pHlp); 622 else 623 pHlp->pfnPrintf(pHlp, "Invalid argument. Recognized arguments are 'basic', 'lvt', 'timer'\n"); 611 apicR3InfoLvtTimer(pVCpu, pHlp); 624 612 } 625 613 … … 1644 1632 1645 1633 /* 1646 * Register debugger info callback. 1647 */ 1648 rc = PDMDevHlpDBGFInfoRegister(pDevIns, "apic", "Display local APIC state for current CPU. Recognizes " 1649 "'basic', 'lvt', 'timer' as arguments, defaults to 'basic'.", apicR3DbgInfo); 1634 * Register debugger info callbacks. 1635 * 1636 * We use separate callbacks rather than arguments so they can also be 1637 * dumped in an automated fashion while collecting crash diagnostics and 1638 * not just used during live debugging via the VM debugger. 1639 */ 1640 rc = DBGFR3InfoRegisterInternalEx(pVM, "apic", "Dumps APIC basic information.", apicR3Info, DBGFINFO_FLAGS_RUN_ON_EMT); 1641 rc |= DBGFR3InfoRegisterInternalEx(pVM, "apiclvt", "Dumps APIC LVT information.", apicR3InfoLvt, DBGFINFO_FLAGS_RUN_ON_EMT); 1642 rc |= DBGFR3InfoRegisterInternalEx(pVM, "apictimer", "Dumps APIC timer information.", apicR3InfoTimer, DBGFINFO_FLAGS_RUN_ON_EMT); 1650 1643 AssertRCReturn(rc, rc); 1651 1644
Note:
See TracChangeset
for help on using the changeset viewer.