Changeset 49972 in vbox for trunk/src/VBox/VMM/tools
- Timestamp:
- Dec 18, 2013 1:10:58 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 91398
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/tools/VBoxCpuReport.cpp
r49966 r49972 2775 2775 2776 2776 2777 /** 2778 * Generic report for an MSR implemented by functions, extended version. 2779 * 2780 * @returns VBox status code. 2781 * @param uMsr The MSR. 2782 * @param pszRdWrFnName The read/write function name, optional. 2783 * @param uValue The MSR range value. 2784 * @param fSkipMask Mask of bits to skip. 2785 * @param fNoGpMask Mask of bits to remove from the GP mask after 2786 * probing 2787 * @param pszAnnotate Annotation. 2788 */ 2777 2789 static int reportMsr_GenFunctionEx(uint32_t uMsr, const char *pszRdWrFnName, uint32_t uValue, 2778 uint64_t fSkipMask, const char *pszAnnotate)2790 uint64_t fSkipMask, uint64_t fNoGpMask, const char *pszAnnotate) 2779 2791 { 2780 2792 /* Resolve default function name. */ … … 2792 2804 if (RT_SUCCESS(rc)) 2793 2805 { 2806 fGpMask &= ~fNoGpMask; 2807 2794 2808 if (fGpMask == UINT64_MAX && uValue == 0 && !msrProberModifyZero(uMsr)) 2795 2809 rc = printMsrFunctionReadOnly(uMsr, pszRdWrFnName, pszAnnotate); … … 2822 2836 if (vbCpuRepSupportsX2Apic()) 2823 2837 fSkipMask |= RT_BIT_64(10); 2824 return reportMsr_GenFunctionEx(uMsr, "Ia32ApicBase", uValue, fSkipMask, NULL);2838 return reportMsr_GenFunctionEx(uMsr, "Ia32ApicBase", uValue, fSkipMask, 0, NULL); 2825 2839 } 2826 2840 … … 3144 3158 } 3145 3159 3146 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, NULL);3160 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, MSR_K6_EFER_LMA, NULL); 3147 3161 } 3148 3162 … … 3322 3336 | RT_BIT(0) /* SysAckLimit */; 3323 3337 3324 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, annotateValue(uValue));3338 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue)); 3325 3339 } 3326 3340 … … 3354 3368 fSkipMask |= RT_BIT(0); /* SMMLOCK */ 3355 3369 3356 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, annotateValue(uValue));3370 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue)); 3357 3371 } 3358 3372 … … 3370 3384 uint64_t fSkipMask = RT_BIT(4) | RT_BIT(3); 3371 3385 fSkipMask |= (RT_BIT_64(vbCpuRepGetPhysAddrWidth()) - 1) & X86_PAGE_4K_BASE_MASK; 3372 return reportMsr_GenFunctionEx(uMsr, NULL, (uMsr - 0xc0010016) / 2, fSkipMask, annotateValue(uValue));3386 return reportMsr_GenFunctionEx(uMsr, NULL, (uMsr - 0xc0010016) / 2, fSkipMask, 0, annotateValue(uValue)); 3373 3387 } 3374 3388 … … 3386 3400 uint64_t fSkipMask = RT_BIT(11); 3387 3401 fSkipMask |= (RT_BIT_64(vbCpuRepGetPhysAddrWidth()) - 1) & X86_PAGE_4K_BASE_MASK; 3388 return reportMsr_GenFunctionEx(uMsr, NULL, (uMsr - 0xc0010017) / 2, fSkipMask, annotateValue(uValue));3402 return reportMsr_GenFunctionEx(uMsr, NULL, (uMsr - 0xc0010017) / 2, fSkipMask, 0, annotateValue(uValue)); 3389 3403 } 3390 3404 … … 3401 3415 /* Skip know bits here, as harm seems to come from messing with them. */ 3402 3416 uint64_t fSkipMask = (RT_BIT_64(vbCpuRepGetPhysAddrWidth()) - 1) & ~(RT_BIT_64(23) - 1); 3403 return reportMsr_GenFunctionEx(uMsr, NULL, uMsr == 0xc001001d, fSkipMask, annotateValue(uValue));3417 return reportMsr_GenFunctionEx(uMsr, NULL, uMsr == 0xc001001d, fSkipMask, 0, annotateValue(uValue)); 3404 3418 } 3405 3419 … … 3486 3500 fSkipMask |= UINT32_C(0x0000003f); /* CpuFid */ 3487 3501 3488 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, annotateValue(uValue));3502 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue)); 3489 3503 } 3490 3504 … … 3556 3570 fSkipMask |= RT_BIT_64(28); /* Unknown killer bit, possibly applicable to other microarchs. */ 3557 3571 } 3558 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, annotateValue(uValue));3572 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue)); 3559 3573 } 3560 3574 … … 3577 3591 | RT_BIT_64(10) /* DcacheAggressivePriority */; 3578 3592 fSkipMask |= RT_BIT_64(46) | RT_BIT_64(45); /* Killer field. Seen bit 46 set, 45 clear. Messing with either means reboot/BSOD. */ 3579 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, annotateValue(uValue));3593 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue)); 3580 3594 } 3581 3595 … … 3593 3607 uint64_t fSkipMask = RT_BIT_64(54) /* LateSbzResync */; 3594 3608 fSkipMask |= RT_BIT_64(35); /* Undocumented killer bit. */ 3595 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, annotateValue(uValue));3609 return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue)); 3596 3610 } 3597 3611 … … 3683 3697 rc = reportMsr_GenX2Apic(&paMsrs[i], cMsrs - i, &i); 3684 3698 else if (uMsr == 0x00002000 && g_enmVendor == CPUMCPUVENDOR_INTEL) 3685 rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 0, X86_CR0_PE | X86_CR0_PG, 3699 rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 0, X86_CR0_PE | X86_CR0_PG, 0, 3686 3700 annotateIfMissingBits(uValue, X86_CR0_PE | X86_CR0_PE | X86_CR0_ET)); 3687 3701 else if (uMsr == 0x00002002 && g_enmVendor == CPUMCPUVENDOR_INTEL) 3688 rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 2, 0, annotateValue(uValue));3702 rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 2, 0, 0, annotateValue(uValue)); 3689 3703 else if (uMsr == 0x00002003 && g_enmVendor == CPUMCPUVENDOR_INTEL) 3690 3704 { … … 3692 3706 if (!vbCpuRepSupportsPae()) 3693 3707 fCr3Mask &= X86_CR3_PAGE_MASK | X86_CR3_AMD64_PAGE_MASK; 3694 rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 3, fCr3Mask, annotateValue(uValue));3708 rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 3, fCr3Mask, 0, annotateValue(uValue)); 3695 3709 } 3696 3710 else if (uMsr == 0x00002004 && g_enmVendor == CPUMCPUVENDOR_INTEL) 3697 3711 rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 4, 3698 X86_CR4_PSE | X86_CR4_PAE | X86_CR4_MCE | X86_CR4_SMXE, 3712 X86_CR4_PSE | X86_CR4_PAE | X86_CR4_MCE | X86_CR4_SMXE, 0, 3699 3713 annotateValue(uValue)); 3700 3714 else if (uMsr == 0xc0000080) 3701 3715 rc = reportMsr_Amd64Efer(uMsr, uValue); 3702 3716 else if (uMsr == 0xc0000082 || uMsr == 0xc0000083 || uMsr == 0xc0000100 || uMsr == 0xc0000101 || uMsr == 0xc0000102) 3703 rc = reportMsr_GenFunctionEx(uMsr, NULL, 0, UINT64_C(0xffff800000000000), annotateValue(uValue)); /* Canoncial address hack. */3717 rc = reportMsr_GenFunctionEx(uMsr, NULL, 0, UINT64_C(0xffff800000000000), 0, annotateValue(uValue)); /* Canoncial address hack. */ 3704 3718 else if (uMsr >= 0xc0000408 && uMsr <= 0xc000040f) 3705 3719 rc = reportMsr_AmdFam10hMc4MiscN(&paMsrs[i], cMsrs - i, &i);
Note:
See TracChangeset
for help on using the changeset viewer.