[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.10] x86/hvm: Use SAVE_ALL to construct the cpu_user_regs frame after VMExit



commit ab95cb0d948fdc9fcda215fec0526ac902340b14
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Thu Feb 8 11:00:45 2018 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Feb 8 11:00:45 2018 +0100

    x86/hvm: Use SAVE_ALL to construct the cpu_user_regs frame after VMExit
    
    No practical change.
    
    One side effect in debug builds is that %rbp is inverted in the manner
    expected by the stack unwinder to indicate a interrupt frame.
    
    This is part of XSA-254.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    master commit: 13682ca8c94bd5612a44f7f1edc1fd8ff675dacb
    master date: 2018-01-05 19:57:08 +0000
---
 xen/arch/x86/hvm/svm/entry.S | 22 ++++------------------
 xen/arch/x86/hvm/vmx/entry.S | 17 ++---------------
 2 files changed, 6 insertions(+), 33 deletions(-)

diff --git a/xen/arch/x86/hvm/svm/entry.S b/xen/arch/x86/hvm/svm/entry.S
index 4a72e38..df86da0 100644
--- a/xen/arch/x86/hvm/svm/entry.S
+++ b/xen/arch/x86/hvm/svm/entry.S
@@ -98,24 +98,10 @@ UNLIKELY_END(svm_trace)
 
         VMRUN
 
-        GET_CURRENT(ax)
-        push %rdi
-        push %rsi
-        push %rdx
-        push %rcx
-        mov  VCPU_svm_vmcb(%rax),%rcx
-        push %rax
-        push %r8
-        push %r9
-        push %r10
-        push %r11
-        push %rbx
-        mov  %rax,%rbx
-        push %rbp
-        push %r12
-        push %r13
-        push %r14
-        push %r15
+        SAVE_ALL
+
+        GET_CURRENT(bx)
+        mov  VCPU_svm_vmcb(%rbx),%rcx
 
         movb $0,VCPU_svm_vmcb_in_sync(%rbx)
         mov  VMCB_rax(%rcx),%rax
diff --git a/xen/arch/x86/hvm/vmx/entry.S b/xen/arch/x86/hvm/vmx/entry.S
index 47cd674..b2f98be 100644
--- a/xen/arch/x86/hvm/vmx/entry.S
+++ b/xen/arch/x86/hvm/vmx/entry.S
@@ -30,23 +30,10 @@
 #define VMLAUNCH     .byte 0x0f,0x01,0xc2
 
 ENTRY(vmx_asm_vmexit_handler)
-        push %rdi
-        push %rsi
-        push %rdx
-        push %rcx
-        push %rax
+        SAVE_ALL
+
         mov  %cr2,%rax
-        push %r8
-        push %r9
-        push %r10
-        push %r11
-        push %rbx
         GET_CURRENT(bx)
-        push %rbp
-        push %r12
-        push %r13
-        push %r14
-        push %r15
 
         movb $1,VCPU_vmx_launched(%rbx)
         mov  %rax,VCPU_hvm_guest_cr2(%rbx)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.10

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.