Push the guest registers first so that they end up at the same location
on the stack as on Intel. This will allow to address them generically
via the per_cpu structure.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
.globl svm_vmexit
svm_vmexit:
/* XXX: GIF is always cleared here */
- push %rax
-
- push -PERCPU_STACK_END+1*8+PERCPU_VMCB_RAX(%rsp)
+ push -PERCPU_STACK_END+PERCPU_VMCB_RAX(%rsp)
push %rcx
push %rdx
push %rbx
push %r15
mov %rsp,%rdi
- lea -PERCPU_STACK_END+1*8+16*8(%rsp),%rsi
+ lea -PERCPU_STACK_END+16*8(%rsp),%rsi
+ push %rax
call vcpu_handle_exit
+ pop %rax
pop %r15
pop %r14
pop %rbx
pop %rdx
pop %rcx
- pop -PERCPU_STACK_END+1*8+PERCPU_VMCB_RAX(%rsp)
-
- pop %rax
+ pop -PERCPU_STACK_END+PERCPU_VMCB_RAX(%rsp)
vmload %rax
vmrun %rax