儲存庫 vbox 的更動 15328
- 時間撮記:
- 2008-12-11 下午06:14:32 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/VMMGC/HWACCMGCA.asm
r15307 r15328 86 86 %endmacro 87 87 88 ; trashes rax & rdx89 %macro VMCSWRITE 290 mov eax, %191 vmwrite rax, %292 %endmacro93 94 ; trashes rax & rdx95 %macro VMCSREAD 296 mov eax, %197 vmread %2, rax98 %endmacro99 100 88 BEGINCODE 101 89 BITS 64 … … 134 122 135 123 .vmptrld_success: 124 125 ; Save the VMCS pointer on the stack 126 push qword [rbp + 16 + 8]; 127 136 128 ; Signal that we're in 64 bits mode now! 137 VMCSREAD VMX_VMCS_CTRL_EXIT_CONTROLS, rdx 129 mov eax, VMX_VMCS_CTRL_EXIT_CONTROLS 130 vmread rdx, rax 138 131 or rdx, VMX_VMCS_CTRL_EXIT_CONTROLS_HOST_AMD64 139 VMCSWRITE VMX_VMCS_CTRL_EXIT_CONTROLS, rdx132 vmwrite rax, rdx 140 133 141 134 ; Save the host state that's relevant in the temporary 64 bits mode 142 mov rax, cr0 143 VMCSWRITE VMX_VMCS_HOST_CR0, rax 144 mov rax, cr3 145 VMCSWRITE VMX_VMCS_HOST_CR3, rax 146 mov rax, cr4 147 VMCSWRITE VMX_VMCS_HOST_CR4, rax 148 mov rax, cs 149 VMCSWRITE VMX_VMCS_HOST_FIELD_CS, rax 150 mov rax, ss 151 VMCSWRITE VMX_VMCS_HOST_FIELD_SS, rax 135 mov rdx, cr0 136 mov eax, VMX_VMCS_HOST_CR0 137 vmwrite rax, rdx 138 139 mov rdx, cr3 140 mov eax, VMX_VMCS_HOST_CR3 141 vmwrite rax, rdx 142 143 mov rdx, cr4 144 mov eax, VMX_VMCS_HOST_CR4 145 vmwrite rax, rdx 146 147 mov rdx, cs 148 mov eax, VMX_VMCS_HOST_FIELD_CS 149 vmwrite rax, rdx 150 151 mov rdx, ss 152 mov eax, VMX_VMCS_HOST_FIELD_SS 153 vmwrite rax, rdx 152 154 153 155 sub rsp, 8*2 154 156 sgdt [rsp] 155 mov rax, [rsp+2]156 VMCSWRITE VMX_VMCS_HOST_GDTR_BASE, rax157 mov eax, VMX_VMCS_HOST_GDTR_BASE 158 vmwrite rax, [rsp+2] 157 159 add rsp, 8*2 158 160 … … 245 247 mov rsi, qword [rsi + CPUMCTX.esi] 246 248 249 jmp near .vmstart64_invalid_vmxon_ptr 250 247 251 vmlaunch 248 252 jmp .vmlaunch64_done; ;/* here if vmlaunch detected a failure. */ … … 304 308 .vmstart64_end: 305 309 ; Signal that we're going back to 32 bits mode! 306 VMCSREAD VMX_VMCS_CTRL_EXIT_CONTROLS, rdx 310 mov eax, VMX_VMCS_CTRL_EXIT_CONTROLS 311 vmread rdx, rax 307 312 and rdx, ~VMX_VMCS_CTRL_EXIT_CONTROLS_HOST_AMD64 308 VMCSWRITE VMX_VMCS_CTRL_EXIT_CONTROLS,rdx313 vmwrite rax, rdx 309 314 310 315 ; Write back the data and disable the VMCS 311 vmclear [rbp + 16 + 8] ;pVMCS 316 vmclear qword [rsp] ;Pushed pVMCS 317 add rsp, 8 312 318 313 319 .vmstart64_vmoff_end: … … 322 328 pop rsi ; pCtx (needed in rsi by the macros below) 323 329 324 ; Restore the host LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs325 ;; @todo use the automatic load feature for MSRs326 SAVEGUESTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE327 328 330 %ifdef VMX_USE_CACHED_VMCS_ACCESSES 329 331 add xSP, xS ; pCache … … 339 341 .vmstart64_start_failed: 340 342 pop rsi ; pCtx (needed in rsi by the macros below) 341 342 ; Restore the host LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs343 ;; @todo use the automatic load feature for MSRs344 SAVEGUESTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE345 343 346 344 %ifdef VMX_USE_CACHED_VMCS_ACCESSES
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器