From: Jack Lange Date: Tue, 11 Aug 2009 21:08:51 +0000 (-0500) Subject: fixed lowlevel svm save/restore register macro X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=1df1d51642fd023684326023459da17765b428ce fixed lowlevel svm save/restore register macro --- diff --git a/palacios/src/palacios/svm_lowlevel.S b/palacios/src/palacios/svm_lowlevel.S index 0d5e870..11cc3b0 100644 --- a/palacios/src/palacios/svm_lowlevel.S +++ b/palacios/src/palacios/svm_lowlevel.S @@ -22,6 +22,7 @@ #ifdef __V3_32BIT__ +// Note that RAX is saved in the VMCB, so we don't touch it here #define Save_SVM_Registers(location) \ pushl %eax; \ movl location, %eax; \ @@ -31,11 +32,7 @@ movl $0, 24(%eax); \ movl %ebx, 32(%eax); \ movl %edx, 40(%eax); \ - movl %ecx, 48(%eax); \ - pushl %ebx; \ - movl 8(%esp), %ebx; \ - movl %ebx, 56(%eax); \ - popl %ebx; \ + movl %ecx, 48(%eax); \ popl %eax; @@ -89,6 +86,7 @@ v3_svm_launch: #elif __V3_64BIT__ +// Note that RAX is saved in the VMCB, so we don't touch it here #define Save_SVM_Registers(location) \ pushq %rax; \ movq location, %rax; \ @@ -99,10 +97,6 @@ v3_svm_launch: movq %rbx, 32(%rax); \ movq %rdx, 40(%rax); \ movq %rcx, 48(%rax); \ - pushq %rbx; \ - movq 16(%rsp), %rbx; \ - movq %rbx, 56(%rax); \ - popq %rbx; \ \ movq %r8, 64(%rax); \ movq %r9, 72(%rax); \