Changeset 77032 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Jan 29, 2019 2:28:03 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128467
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
r76886 r77032 3711 3711 cpumR3CpuIdZeroLeaf(pCpum, UINT32_C(0x80000009)); 3712 3712 3713 /* Cpuid 0x8000000a: SVM Information3714 * AMD: EAX - SVM revision.3715 * EBX - Number of ASIDs.3716 * ECX - Reserved.3717 * EDX - SVM Feature identification.3713 /* Cpuid 0x8000000a: SVM information on AMD, invalid on Intel. 3714 * AMD: EAX - SVM revision. 3715 * EBX - Number of ASIDs. 3716 * ECX - Reserved. 3717 * EDX - SVM Feature identification. 3718 3718 */ 3719 3719 pExtFeatureLeaf = cpumR3CpuIdGetExactLeaf(pCpum, UINT32_C(0x80000001), 0); 3720 if (pExtFeatureLeaf->uEcx & X86_CPUID_AMD_FEATURE_ECX_SVM) 3720 if ( pExtFeatureLeaf 3721 && (pExtFeatureLeaf->uEcx & X86_CPUID_AMD_FEATURE_ECX_SVM) 3722 && pCpum->GuestFeatures.enmCpuVendor == CPUMCPUVENDOR_AMD) 3721 3723 { 3722 3724 PCPUMCPUIDLEAF pSvmFeatureLeaf = cpumR3CpuIdGetExactLeaf(pCpum, 0x8000000a, 0); 3723 pSvmFeatureLeaf->uEax = 0x1; 3724 pSvmFeatureLeaf->uEbx = 0x8000; /** @todo figure out virtual NASID. */ 3725 pSvmFeatureLeaf->uEcx = 0; 3726 pSvmFeatureLeaf->uEdx &= ( X86_CPUID_SVM_FEATURE_EDX_NRIP_SAVE /** @todo Support other SVM features */ 3727 | X86_CPUID_SVM_FEATURE_EDX_FLUSH_BY_ASID 3728 | X86_CPUID_SVM_FEATURE_EDX_DECODE_ASSISTS); 3729 } 3730 else 3731 cpumR3CpuIdZeroLeaf(pCpum, UINT32_C(0x8000000a)); 3725 if (pSvmFeatureLeaf) 3726 { 3727 pSvmFeatureLeaf->uEax = 0x1; 3728 pSvmFeatureLeaf->uEbx = 0x8000; /** @todo figure out virtual NASID. */ 3729 pSvmFeatureLeaf->uEcx = 0; 3730 pSvmFeatureLeaf->uEdx &= ( X86_CPUID_SVM_FEATURE_EDX_NRIP_SAVE /** @todo Support other SVM features */ 3731 | X86_CPUID_SVM_FEATURE_EDX_FLUSH_BY_ASID 3732 | X86_CPUID_SVM_FEATURE_EDX_DECODE_ASSISTS); 3733 } 3734 else 3735 { 3736 LogRel(("CPUM: Warning! Expected CPUID leaf 0x8000000a not present! SVM features not exposed to the guest\n")); 3737 cpumR3CpuIdZeroLeaf(pCpum, UINT32_C(0x8000000a)); 3738 } 3739 } 3732 3740 3733 3741 /* Cpuid 0x8000000b thru 0x80000018: Reserved
Note:
See TracChangeset
for help on using the changeset viewer.