Changeset 66104 in vbox for trunk/src/VBox/VMM/VMMRC
- Timestamp:
- Mar 15, 2017 10:06:21 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 113985
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMRC/CPUMRCPatchHlp.asm
r62478 r66104 36 36 37 37 ;; 38 ; Helper for PATMCpuidReplacement. 39 ; 38 ; Helper for PATMCpuidReplacement. 39 ; 40 40 ; We have at most 32 bytes of stack to play with, . 41 41 ; … … 59 59 ; 60 60 ; Perform a binary search looking for leaf with the EAX value. 61 ; 62 mov edx, [ss:edi + VM.cpum + CPUM.GuestInfo + CPUMINFO.cCpuIdLeaves] 61 ; 62 mov edx, [ss:edi + VM.cpum + CPUM.GuestInfo + CPUMINFO.cCpuIdLeaves] 63 63 mov ecx, [ss:edi + VM.cpum + CPUM.GuestInfo + CPUMINFO.paCpuIdLeavesRC] 64 64 test edx, edx … … 98 98 ; We've to a matching leaf, does the sub-leaf match too? 99 99 ; 100 cpuid_match_eax: 100 cpuid_match_eax: 101 101 mov ecx, [esp + 4] 102 102 and ecx, [ss:ebx + CPUMCPUIDLEAF.fSubLeafMask] … … 112 112 113 113 cpuid_lookup_subleaf_backwards_loop: 114 cmp ebx, edx ; Is there a leaf before the current? 114 cmp ebx, edx ; Is there a leaf before the current? 115 115 jbe cpuid_subleaf_not_found ; If not we're out of luck. 116 116 cmp eax, [ss:ebx - CPUMCPUIDLEAF_size + CPUMCPUIDLEAF.uLeaf] … … 123 123 124 124 ; 125 ; Search forward until we've got a matching sub-leaf (or not). 125 ; Search forward until we've got a matching sub-leaf (or not). 126 126 ; 127 127 cpuid_lookup_subleaf_forwards: 128 128 ; Calculate the last leaf address. 129 mov edx, [ss:edi + VM.cpum + CPUM.GuestInfo + CPUMINFO.cCpuIdLeaves] 129 mov edx, [ss:edi + VM.cpum + CPUM.GuestInfo + CPUMINFO.cCpuIdLeaves] 130 130 dec edx 131 131 shl edx, CPUMCPUIDLEAF_SIZE_LOG2 … … 138 138 jne cpuid_subleaf_not_found 139 139 add ebx, CPUMCPUIDLEAF_size 140 cmp ecx, [ss:ebx + CPUMCPUIDLEAF.uSubLeaf] 140 cmp ecx, [ss:ebx + CPUMCPUIDLEAF.uSubLeaf] 141 141 ja cpuid_subleaf_lookup 142 142 je cpuid_fetch 143 143 144 144 ; 145 145 ; Out of range sub-leaves aren't quite as easy and pretty as we emulate them 146 146 ; here, but we do an adequate job. 147 ; 147 ; 148 148 cpuid_subleaf_not_found: 149 149 xor ecx, ecx … … 189 189 mov eax, [ss:ebx + CPUMCPUIDLEAF.uEax] 190 190 mov ebx, [ss:ebx + CPUMCPUIDLEAF.uEbx] 191 191 192 192 cpuid_done: 193 193 pop edi
Note:
See TracChangeset
for help on using the changeset viewer.