Changeset 13960 in vbox for trunk/src/VBox/VMM/VMMGC
- Timestamp:
- Nov 7, 2008 1:04:45 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 38992
- Location:
- trunk/src/VBox/VMM/VMMGC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMGC/CPUMGC.cpp
r8155 r13960 64 64 if (uUser & CPUM_HANDLER_CTXCORE_IN_EBP) 65 65 { 66 PCPUMCTXCORE pGstCtxCore = CPUMCTX2CORE(&pVM->cpum.s.Guest);66 PCPUMCTXCORE pGstCtxCore = (PCPUMCTXCORE)CPUMGetGuestCtxCore(pVM); 67 67 PCCPUMCTXCORE pGstCtxCoreSrc = (PCPUMCTXCORE)pRegFrame->ebp; 68 68 *pGstCtxCore = *pGstCtxCoreSrc; … … 90 90 case CPUM_HANDLER_IRET: 91 91 { 92 PCPUMCTXCORE pGstCtxCore = CPUMCTX2CORE(&pVM->cpum.s.Guest);92 PCPUMCTXCORE pGstCtxCore = (PCPUMCTXCORE)CPUMGetGuestCtxCore(pVM); 93 93 uint32_t *pEsp = (uint32_t *)pRegFrame->esp; 94 94 -
trunk/src/VBox/VMM/VMMGC/CPUMGCA.asm
r12989 r13960 73 73 mov eax, [esp + 4] ; get argument 74 74 mov edx, IMP(g_CPUM) 75 76 mov ecx, [edx + CPUM.Guest.eip] 75 ; Convert to CPUMCPU pointer 76 add edx, [edx + CPUM.ulOffCPUMCPU] 77 78 mov ecx, [edx + CPUMCPU.Guest.eip] 77 79 mov [eax + 0h], ecx 78 mov ecx, [edx + CPUM .Guest.cs]80 mov ecx, [edx + CPUMCPU.Guest.cs] 79 81 mov [eax + 4h], ecx 80 mov ecx, [edx + CPUM .Guest.eflags]82 mov ecx, [edx + CPUMCPU.Guest.eflags] 81 83 mov [eax + 8h], ecx 82 mov ecx, [edx + CPUM .Guest.esp]84 mov ecx, [edx + CPUMCPU.Guest.esp] 83 85 mov [eax + 0ch], ecx 84 mov ecx, [edx + CPUM .Guest.ss]86 mov ecx, [edx + CPUMCPU.Guest.ss] 85 87 mov [eax + 10h], ecx 86 88 87 test dword [edx + CPUM .Guest.eflags], X86_EFL_VM89 test dword [edx + CPUMCPU.Guest.eflags], X86_EFL_VM 88 90 jnz short CPUMGCRestoreInt_V86 89 91 … … 93 95 ; todo: potential trouble loading invalid es,fs,gs,ds because 94 96 ; of a VMM imposed exception? 95 mov es, [edx + CPUM .Guest.es]96 mov fs, [edx + CPUM .Guest.fs]97 mov gs, [edx + CPUM .Guest.gs]98 mov esi, [edx + CPUM .Guest.esi]99 mov edi, [edx + CPUM .Guest.edi]100 mov ebp, [edx + CPUM .Guest.ebp]101 mov ebx, [edx + CPUM .Guest.ebx]102 mov ecx, [edx + CPUM .Guest.ecx]103 mov eax, [edx + CPUM .Guest.eax]104 push dword [edx + CPUM .Guest.ds]105 mov edx, [edx + CPUM .Guest.edx]97 mov es, [edx + CPUMCPU.Guest.es] 98 mov fs, [edx + CPUMCPU.Guest.fs] 99 mov gs, [edx + CPUMCPU.Guest.gs] 100 mov esi, [edx + CPUMCPU.Guest.esi] 101 mov edi, [edx + CPUMCPU.Guest.edi] 102 mov ebp, [edx + CPUMCPU.Guest.ebp] 103 mov ebx, [edx + CPUMCPU.Guest.ebx] 104 mov ecx, [edx + CPUMCPU.Guest.ecx] 105 mov eax, [edx + CPUMCPU.Guest.eax] 106 push dword [edx + CPUMCPU.Guest.ds] 107 mov edx, [edx + CPUMCPU.Guest.edx] 106 108 pop ds 107 109 … … 110 112 CPUMGCRestoreInt_V86: 111 113 ; iret restores ds, es, fs & gs 112 mov ecx, [edx + CPUM .Guest.es]114 mov ecx, [edx + CPUMCPU.Guest.es] 113 115 mov [eax + 14h], ecx 114 mov ecx, [edx + CPUM .Guest.ds]116 mov ecx, [edx + CPUMCPU.Guest.ds] 115 117 mov [eax + 18h], ecx 116 mov ecx, [edx + CPUM .Guest.fs]118 mov ecx, [edx + CPUMCPU.Guest.fs] 117 119 mov [eax + 1Ch], ecx 118 mov ecx, [edx + CPUM .Guest.gs]120 mov ecx, [edx + CPUMCPU.Guest.gs] 119 121 mov [eax + 20h], ecx 120 mov esi, [edx + CPUM .Guest.esi]121 mov edi, [edx + CPUM .Guest.edi]122 mov ebp, [edx + CPUM .Guest.ebp]123 mov ebx, [edx + CPUM .Guest.ebx]124 mov ecx, [edx + CPUM .Guest.ecx]125 mov eax, [edx + CPUM .Guest.eax]126 mov edx, [edx + CPUM .Guest.edx]122 mov esi, [edx + CPUMCPU.Guest.esi] 123 mov edi, [edx + CPUMCPU.Guest.edi] 124 mov ebp, [edx + CPUMCPU.Guest.ebp] 125 mov ebx, [edx + CPUMCPU.Guest.ebx] 126 mov ecx, [edx + CPUMCPU.Guest.ecx] 127 mov eax, [edx + CPUMCPU.Guest.eax] 128 mov edx, [edx + CPUMCPU.Guest.edx] 127 129 ret 128 130 … … 250 252 align 16 251 253 BEGINPROC_EXPORTED CPUMGCResumeGuest 254 ; Convert to CPUMCPU pointer 255 add edx, [edx + CPUM.ulOffCPUMCPU] 252 256 ; 253 257 ; Setup iretd 254 258 ; 255 push dword [edx + CPUM .Guest.ss]256 push dword [edx + CPUM .Guest.esp]257 push dword [edx + CPUM .Guest.eflags]258 push dword [edx + CPUM .Guest.cs]259 push dword [edx + CPUM .Guest.eip]259 push dword [edx + CPUMCPU.Guest.ss] 260 push dword [edx + CPUMCPU.Guest.esp] 261 push dword [edx + CPUMCPU.Guest.eflags] 262 push dword [edx + CPUMCPU.Guest.cs] 263 push dword [edx + CPUMCPU.Guest.eip] 260 264 261 265 ; … … 263 267 ; 264 268 TRPM_NP_GP_HANDLER NAME(cpumGCHandleNPAndGP), CPUM_HANDLER_ES 265 mov es, [edx + CPUM .Guest.es]269 mov es, [edx + CPUMCPU.Guest.es] 266 270 TRPM_NP_GP_HANDLER NAME(cpumGCHandleNPAndGP), CPUM_HANDLER_FS 267 mov fs, [edx + CPUM .Guest.fs]271 mov fs, [edx + CPUMCPU.Guest.fs] 268 272 TRPM_NP_GP_HANDLER NAME(cpumGCHandleNPAndGP), CPUM_HANDLER_GS 269 mov gs, [edx + CPUM .Guest.gs]273 mov gs, [edx + CPUMCPU.Guest.gs] 270 274 271 275 %ifdef VBOX_WITH_STATISTICS … … 296 300 ; Continue restore. 297 301 ; 298 mov esi, [edx + CPUM .Guest.esi]299 mov edi, [edx + CPUM .Guest.edi]300 mov ebp, [edx + CPUM .Guest.ebp]301 mov ebx, [edx + CPUM .Guest.ebx]302 mov ecx, [edx + CPUM .Guest.ecx]303 mov eax, [edx + CPUM .Guest.eax]304 push dword [edx + CPUM .Guest.ds]305 mov edx, [edx + CPUM .Guest.edx]302 mov esi, [edx + CPUMCPU.Guest.esi] 303 mov edi, [edx + CPUMCPU.Guest.edi] 304 mov ebp, [edx + CPUMCPU.Guest.ebp] 305 mov ebx, [edx + CPUMCPU.Guest.ebx] 306 mov ecx, [edx + CPUMCPU.Guest.ecx] 307 mov eax, [edx + CPUMCPU.Guest.eax] 308 push dword [edx + CPUMCPU.Guest.ds] 309 mov edx, [edx + CPUMCPU.Guest.edx] 306 310 TRPM_NP_GP_HANDLER NAME(cpumGCHandleNPAndGP), CPUM_HANDLER_DS 307 311 pop ds … … 326 330 align 16 327 331 BEGINPROC_EXPORTED CPUMGCResumeGuestV86 332 ; Convert to CPUMCPU pointer 333 add edx, [edx + CPUM.ulOffCPUMCPU] 328 334 ; 329 335 ; Setup iretd 330 336 ; 331 push dword [edx + CPUM .Guest.gs]332 push dword [edx + CPUM .Guest.fs]333 push dword [edx + CPUM .Guest.ds]334 push dword [edx + CPUM .Guest.es]335 336 push dword [edx + CPUM .Guest.ss]337 push dword [edx + CPUM .Guest.esp]338 339 push dword [edx + CPUM .Guest.eflags]340 push dword [edx + CPUM .Guest.cs]341 push dword [edx + CPUM .Guest.eip]337 push dword [edx + CPUMCPU.Guest.gs] 338 push dword [edx + CPUMCPU.Guest.fs] 339 push dword [edx + CPUMCPU.Guest.ds] 340 push dword [edx + CPUMCPU.Guest.es] 341 342 push dword [edx + CPUMCPU.Guest.ss] 343 push dword [edx + CPUMCPU.Guest.esp] 344 345 push dword [edx + CPUMCPU.Guest.eflags] 346 push dword [edx + CPUMCPU.Guest.cs] 347 push dword [edx + CPUMCPU.Guest.eip] 342 348 343 349 ; … … 372 378 ; Continue restore. 373 379 ; 374 mov esi, [edx + CPUM .Guest.esi]375 mov edi, [edx + CPUM .Guest.edi]376 mov ebp, [edx + CPUM .Guest.ebp]377 mov ecx, [edx + CPUM .Guest.ecx]378 mov ebx, [edx + CPUM .Guest.ebx]379 mov eax, [edx + CPUM .Guest.eax]380 mov edx, [edx + CPUM .Guest.edx]380 mov esi, [edx + CPUMCPU.Guest.esi] 381 mov edi, [edx + CPUMCPU.Guest.edi] 382 mov ebp, [edx + CPUMCPU.Guest.ebp] 383 mov ecx, [edx + CPUMCPU.Guest.ecx] 384 mov ebx, [edx + CPUMCPU.Guest.ebx] 385 mov eax, [edx + CPUMCPU.Guest.eax] 386 mov edx, [edx + CPUMCPU.Guest.edx] 381 387 382 388 ; restart execution. -
trunk/src/VBox/VMM/VMMGC/TRPMGCHandlers.cpp
r13823 r13960 441 441 442 442 LogFlow(("TRPMTrap07HandlerGC: eip=%08RX32\n", pRegFrame->eip)); 443 return CPUMHandleLazyFPU(pVM );443 return CPUMHandleLazyFPU(pVM, VMMGetCpu(pVM)); 444 444 } 445 445
Note:
See TracChangeset
for help on using the changeset viewer.