Changeset 14785 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Nov 28, 2008 3:11:20 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/CPUMInternal.h
r14411 r14785 361 361 uint32_t ulOffCPUM; 362 362 363 /* Round to 16 byte size. */ 363 /* Temporary storage for the return code of the function called in the 32-64 switcher. */ 364 uint32_t u32RetCode; 365 366 /* Round to 16 byte size. 364 367 uint32_t uPadding; 368 */ 365 369 } CPUMCPU, *PCPUMCPU; 366 370 /** Pointer to the CPUMCPU instance data residing in the shared VMCPU structure. */ -
trunk/src/VBox/VMM/CPUMInternal.mac
r14411 r14785 407 407 .fChanged resd 1 408 408 .ulOffCPUM resd 1 409 .u Paddingresd 1409 .u32RetCode resd 1 410 410 endstruc 411 411 -
trunk/src/VBox/VMM/Makefile.kmk
r14766 r14785 336 336 VMMAll/CPUMAllA.asm \ 337 337 VMMAll/DBGFAll.cpp \ 338 VMMGC/HWACCMGCA.asm \ 338 339 VMMAll/IOMAll.cpp \ 339 340 VMMAll/IOMAllMMIO.cpp \ -
trunk/src/VBox/VMM/VMMGC/VMMGC.def
r14042 r14785 63 63 VMSetError 64 64 VMSetErrorV 65 VMXGCStartVM64 66 SVMGCVMRun64 65 67 66 68 ; runtime -
trunk/src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac
r14776 r14785 232 232 ALIGNCODE(16) 233 233 GLOBALNAME ICEnterTarget 234 ; at this moment we're in 64-bit mode. let's write something to CPUM235 234 ; Load CPUM pointer into rdx 236 235 mov rdx, [NAME(pCpumIC) wrt rip] 237 ; Load the CPUMCPU offset. 238 mov r8, [rdx + CPUM.ulOffCPUMCPU] 239 240 mov rsi, 012345678h 241 mov [rdx + r8 + CPUMCPU.uPadding], rsi 242 236 237 mov rax, cs 238 mov ds, rax 239 mov es, rax 240 mov fs, rax 241 mov gs, rax 242 243 ; Setup stack; use the lss_esp, ss pair for lss 244 DEBUG_CHAR('7') 245 mov rsp, 0 246 mov eax, [rdx + CPUM.Hyper.esp] 247 mov [rdx + CPUM.Hyper.lss_esp], eax 248 lss esp, [rdx + CPUM.Hyper.lss_esp] 249 250 ; call the hypervisor function with rdx=pCpumCpu 251 mov eax, [rdx + r8 + CPUM.Hyper.eip] 252 CPUMCPU_FROM_CPUM(rdx) 253 call rax 254 255 ; Load CPUM pointer into rdx 256 mov rdx, [NAME(pCpumIC) wrt rip] 257 CPUMCPU_FROM_CPUM(rdx) 258 259 ; Save the return code 260 mov [rdx + CPUMCPU.u32RetCode], eax 261 243 262 ; now let's switch back 244 mov rax, 0666h245 263 jmp NAME(VMMGCGuestToHostAsm) ; rax = returncode. 246 264 … … 439 457 440 458 ; restore general registers. 441 mov eax, edi ; restore return code. eax = return code !!442 459 mov edi, [edx + CPUMCPU.Host.edi] 443 460 mov esi, [edx + CPUMCPU.Host.esi] 444 461 mov ebx, [edx + CPUMCPU.Host.ebx] 445 462 mov ebp, [edx + CPUMCPU.Host.ebp] 463 464 ; store the return code in eax 465 mov eax, [edx + CPUMCPU.u32RetCode] 466 446 467 push dword [edx + CPUMCPU.Host.eflags] 447 468 popfd 448 469 449 %ifdef DEBUG_STUFF450 ; COM_S_CHAR '4'451 %endif452 470 retf 453 471
Note:
See TracChangeset
for help on using the changeset viewer.