Changeset 140 in vbox
- Timestamp:
- Jan 18, 2007 3:28:16 PM (18 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/CPUMInternal.h
r23 r140 153 153 uint8_t auPadding[24]; 154 154 155 #el se /* 64-bit */155 #elif HC_ARCH_BITS == 64 156 156 /** General purpose register ++ 157 157 * { */ … … 234 234 /* padding to get 32byte aligned size */ 235 235 uint8_t auPadding[8]; 236 #endif /* 64-bit */ 236 #else 237 # error HC_ARCH_BITS not defined 238 #endif 237 239 } CPUMHOSTCTX, *PCPUMHOSTCTX; 238 240 -
trunk/src/VBox/VMM/VMMInternal.h
r23 r140 102 102 /** Tranditional jmp_buf stuff 103 103 * @{ */ 104 #if HC_ARCH_BITS == 32 104 105 uint32_t ebx; 105 106 uint32_t esi; … … 108 109 uint32_t esp; 109 110 uint32_t eip; 111 #endif 112 #if HC_ARCH_BITS == 64 113 uint64_t rbx; 114 # ifdef __WIN__ 115 uint64_t rsi; 116 uint64_t rdi; 117 # endif 118 uint64_t rbp; 119 uint64_t r12; 120 uint64_t r13; 121 uint64_t r14; 122 uint64_t r15; 123 uint64_t rsp; 124 uint64_t rip; 125 #endif 110 126 /** @} */ 111 127 112 128 /** Flag that indicates that we've done a ring-3 call. */ 113 129 bool fInRing3Call; 130 /** The number of bytes we've saved. */ 131 uint32_t cbSavedStack; 114 132 /** Pointer to the buffer used to save the stack. 115 133 * This is assumed to be 8KB. */ 116 134 void *pvSavedStack; 117 /** The number of bytes we've saved. */118 uint32_t cbSavedStack;119 135 /** Esp we we match against esp on resume to make sure the stack wasn't relocated. */ 120 uint32_t espCheck;136 RTHCUINTREG SpCheck; 121 137 /** The esp we should resume execution with after the restore. */ 122 uint32_t espResume;138 RTHCUINTREG SpResume; 123 139 } VMMR0JMPBUF, *PVMMR0JMPBUF; 124 140 -
trunk/src/VBox/VMM/VMMInternal.mac
r19 r140 34 34 ; additional state and stack info. 35 35 .fInRing3Call resd 1 36 .cbSavedStack resd 1 36 37 .pvSavedStack resd 1 37 .cbSavedStack resd 1 38 .espCheck resd 1 39 .espResume resd 1 38 .SpCheck resd 1 39 .SpResume resd 1 40 40 %endif 41 41 %ifdef __AMD64__ … … 58 58 .cbSavedStack resd 1 59 59 .pvSavedStack resq 1 60 . rspCheckresq 161 . rspResumeresq 160 .SpCheck resq 1 61 .SpResume resq 1 62 62 %endif 63 63 endstruc -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r72 r140 657 657 * Check that the jump buffer is armed. 658 658 */ 659 #ifdef __X86__ 659 660 if (!pVM->vmm.s.CallHostR0JmpBuf.eip) 661 #else 662 if (!pVM->vmm.s.CallHostR0JmpBuf.rip) 663 #endif 660 664 { 661 665 LogCom(("vmmR0LoggerFlush: Jump buffer isn't armed!\n")); -
trunk/src/VBox/VMM/VMMR0/VMMR0A.asm
r19 r140 83 83 .resume: 84 84 ; Sanity checks. 85 cmp ecx, [edx + VMMR0JMPBUF. espCheck]85 cmp ecx, [edx + VMMR0JMPBUF.SpCheck] 86 86 je .espCheck_ok 87 87 .bad: … … 100 100 jnz .bad 101 101 mov edi, [edx + VMMR0JMPBUF.esp] 102 sub edi, [edx + VMMR0JMPBUF. espResume]102 sub edi, [edx + VMMR0JMPBUF.SpResume] 103 103 cmp ecx, edi 104 104 jne .bad … … 111 111 shr ecx, 2 112 112 mov esi, [edx + VMMR0JMPBUF.pvSavedStack] 113 mov edi, [edx + VMMR0JMPBUF. espResume]113 mov edi, [edx + VMMR0JMPBUF.SpResume] 114 114 mov esp, edi 115 115 rep movsd … … 168 168 ; 169 169 mov edi, [edx + VMMR0JMPBUF.pvSavedStack] 170 mov [edx + VMMR0JMPBUF. espResume], esp170 mov [edx + VMMR0JMPBUF.SpResume], esp 171 171 mov esi, esp 172 172 mov ecx, [edx + VMMR0JMPBUF.esp] … … 193 193 ; store the last pieces of info. 194 194 mov ecx, [edx + VMMR0JMPBUF.esp] 195 mov [edx + VMMR0JMPBUF. espCheck], ecx195 mov [edx + VMMR0JMPBUF.SpCheck], ecx 196 196 mov byte [edx + VMMR0JMPBUF.fInRing3Call], 1 197 197
Note:
See TracChangeset
for help on using the changeset viewer.