VirtualBox

Changeset 87336 in vbox for trunk/src


Ignore:
Timestamp:
Jan 21, 2021 1:20:00 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142312
Message:

VMM/HMR0A.asm: Restore non-volatile registers skipping loading the filler value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMR0A.asm

    r87335 r87336  
    12101210        mov     rax, [rsp + cbFrame + frm_pVCpu] ; (rbp still not operational)
    12111211
    1212         mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.ebx], rbx
    1213         mov     rbx, SPECTRE_FILLER
    1214         mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.ecx], rcx
    1215         mov     rcx, rbx
    1216         mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.edx], rdx
    1217         mov     rdx, rbx
    1218         mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.esi], rsi
    1219         mov     rsi, rbx
    1220         mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.edi], rdi
    1221         mov     rdi, rbx
    12221212        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.ebp], rbp
    12231213        lea     rbp, [rsp + cbFrame]
     1214        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.ecx], rcx
     1215        mov     rcx, SPECTRE_FILLER
     1216        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.edx], rdx
     1217        mov     rdx, rcx
    12241218        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.r8],  r8
    1225         mov     r8, rbx
     1219        mov     r8, rcx
    12261220        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.r9],  r9
    1227         mov     r9, rbx
     1221        mov     r9, rcx
    12281222        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.r10], r10
    1229         mov     r10, rbx
     1223        mov     r10, rcx
    12301224        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.r11], r11
    1231         mov     r11, rbx
     1225        mov     r11, rcx
     1226        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.edi], rdi
     1227%ifdef ASM_CALL64_MSC
     1228        mov     rdi, [rbp + frm_saved_rdi]
     1229%else
     1230        mov     rdi, rcx
     1231%endif
     1232        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.esi], rsi
     1233%ifdef ASM_CALL64_MSC
     1234        mov     rsi, [rbp + frm_saved_rsi]
     1235%else
     1236        mov     rsi, rcx
     1237%endif
     1238        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.ebx], rbx
     1239        mov     rbx, [rbp + frm_saved_rbx]
    12321240        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.r12], r12
    1233         mov     r12, rbx
     1241        mov     r12, [rbp + frm_saved_r12]
    12341242        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.r13], r13
    1235         mov     r13, rbx
     1243        mov     r13, [rbp + frm_saved_r13]
    12361244        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.r14], r14
    1237         mov     r14, rbx
     1245        mov     r14, [rbp + frm_saved_r14]
    12381246        mov     qword [rax + VMCPU.cpum.GstCtx + CPUMCTX.r15], r15
    1239         mov     r15, rbx
     1247        mov     r15, [rbp + frm_saved_r15]
    12401248
    12411249        ; Fight spectre.  Note! Trashes rax, rdx and rcx!
     
    12501258        xsetbv                              ; ecx is already zero
    12511259.xcr0_after_skip:
    1252 
    1253         ; Restore host general purpose registers.
    1254         POP_CALLEE_PRESERVED_REGISTERS
    1255 
     1260nop
     1261;       POP_CALLEE_PRESERVED_REGISTERS
     1262;%if cbFrame != 30h
     1263; %error Bad cbFrame value
     1264;%endif
     1265
     1266        add     rsp, cbFrame - 8h
    12561267        mov     eax, VINF_SUCCESS
    1257 
    1258         add     rsp, 30h - 8h
    12591268        popf
    12601269        leave
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette