Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Added shadow page handling, IO and MSR bitmap allocation, and started
[palacios.git] / palacios / src / palacios / vmx_lowlevel.S
index 0651542..f0e793f 100644 (file)
@@ -100,12 +100,14 @@ v3_vmx_exit_handler:
     POPA
     popf
     pushq %rdi
+    pushq %rsi
     call v3_handle_vmx_exit
 
     andq %rax, %rax
     jnz .Lvmm_failure
 
 v3_vmx_vmresume:
+    pop %rsi
     pop %rdi
     pushf
     PUSHA
@@ -114,9 +116,9 @@ v3_vmx_vmresume:
 
     vmresume
 
-    addq $8, %rsp
     jz .Lfail_valid
     jc .Lfail_invalid
+    addq $8, %rsp
     jmp .Lreturn
 
 .align 8
@@ -150,24 +152,24 @@ v3_vmx_vmlaunch:
 .Lfail_valid:
     addq $8, %rsp
     POPA
+    popf
     movq $VMX_FAIL_VALID, %rax
     jmp .Lreturn
 
 .Lfail_invalid:
     addq $8, %rsp
     POPA
+    popf
     movq $VMX_FAIL_INVALID, %rax
     jmp .Lreturn
 
 .Lvmm_failure:
-    addq $8, %rsp
-    POPA
+    addq $16, %rsp
     movq $VMM_FAILURE, %rax
     jmp .Lreturn
 
 .Lreturn:
     sti
-    popf
     ret
     
 #else
@@ -222,10 +224,10 @@ v3_vmx_vmlaunch:
 .globl v3_vmx_exit_handler
 v3_vmx_exit_handler:
     save_registers(4(%esp))
-    addl $8, %rsp
+    addl $8, %esp
     POPA
     popf
-    pushl %rdi
+    pushl %edi
     call v3_handle_vmx_exit
 
     andl %eax, %eax