Changeset 45711 in vbox
- Timestamp:
- Apr 24, 2013 4:24:19 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMRC/HMRCA.asm
r45474 r45711 229 229 ; */ 230 230 231 %ifndef VBOX_WITH_AUTO_MSR_LOAD_RESTORE 231 232 ; Load the guest LSTAR, CSTAR, SFMASK & KERNEL_GSBASE MSRs 232 ;; @todo use the automatic load feature for MSRs233 233 LOADGUESTMSR MSR_K8_LSTAR, CPUMCTX.msrLSTAR 234 234 LOADGUESTMSR MSR_K6_STAR, CPUMCTX.msrSTAR 235 235 LOADGUESTMSR MSR_K8_SF_MASK, CPUMCTX.msrSFMASK 236 %endif 237 ; Kernel GS Base is special, we need to manually load/store it, see @bugref{6208}. 236 238 LOADGUESTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE 237 239 … … 245 247 ; Restore CR2 246 248 mov rbx, qword [rsi + CPUMCTX.cr2] 249 mov rdx, cr2 250 cmp rdx, rbx 251 je .skipcr2write64 247 252 mov cr2, rbx 248 253 254 .skipcr2write64: 249 255 mov eax, VMX_VMCS_HOST_RSP 250 256 vmwrite rax, rsp … … 296 302 mov qword [rdi + CPUMCTX.r14], r14 297 303 mov qword [rdi + CPUMCTX.r15], r15 304 %ifndef VBOX_WITH_OLD_VTX_CODE 305 mov rax, cr2 306 mov qword [rdi + CPUMCTX.cr2], rax 307 %endif 298 308 299 309 pop rax ; the guest edi we pushed above … … 302 312 pop rsi ; pCtx (needed in rsi by the macros below) 303 313 304 ;; @todo use the automatic load feature for MSRs 314 %ifndef VBOX_WITH_AUTO_MSR_LOAD_RESTORE 305 315 SAVEGUESTMSR MSR_K8_LSTAR, CPUMCTX.msrLSTAR 306 316 SAVEGUESTMSR MSR_K6_STAR, CPUMCTX.msrSTAR 307 317 SAVEGUESTMSR MSR_K8_SF_MASK, CPUMCTX.msrSFMASK 318 %endif 319 ; Kernel GS Base is special, we need to manually load/store it, see @bugref{6208}. 308 320 SAVEGUESTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE 309 321 … … 335 347 .no_cached_reads: 336 348 349 %ifdef VBOX_WITH_OLD_VTX_CODE 337 350 ; Save CR2 for EPT 338 351 mov rax, cr2 339 352 mov [rdi + VMCSCACHE.cr2], rax 353 %endif 340 354 %ifdef VBOX_WITH_CRASHDUMP_MAGIC 341 355 mov dword [rdi + VMCSCACHE.uPos], 8
Note:
See TracChangeset
for help on using the changeset viewer.