X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm_lowlevel.S;h=3a17df4c6dce1ee124055ba6171513621d7b166d;hp=9b201b1116f767c5cf6e9f9c663f12d09719cc6f;hb=04977d080b9850506ced2523b6130abc517b61df;hpb=729766ab651b7ea7f10f6e4a49ac8fffdc0694c4 diff --git a/palacios/src/palacios/svm_lowlevel.S b/palacios/src/palacios/svm_lowlevel.S index 9b201b1..3a17df4 100644 --- a/palacios/src/palacios/svm_lowlevel.S +++ b/palacios/src/palacios/svm_lowlevel.S @@ -49,21 +49,6 @@ popl %eax; - -#elif __V3_64BIT__ - -#endif - - -v3_stgi: - stgi; - ret; - -v3_clgi: - clgi; - ret; - - v3_svm_launch: push %ebp; movl %esp, %ebp; @@ -92,3 +77,55 @@ v3_svm_launch: popf; pop %ebp; ret + + + +#elif __V3_64BIT__ + +#define Save_SVM_Registers(location) \ + pushl %eax; \ + movl location, %eax; \ + movl %edi, (%eax); \ + movl %esi, 8(%eax); \ + movl %ebp, 16(%eax); \ + movl $0, 24(%eax); \ + movl %ebx, 32(%eax); \ + movl %edx, 40(%eax); \ + movl %ecx, 48(%eax); \ + pushl %ebx; \ + movl 4(%esp), %ebx; \ + movl %ebx, 56(%eax); \ + popl %ebx; \ + popl %eax; + + +#define Restore_SVM_Registers(location) \ + pushl %eax; \ + movl location, %eax; \ + movl (%eax), %edi; \ + movl 8(%eax), %esi; \ + movl 16(%eax), %ebp; \ + movl 32(%eax), %ebx; \ + movl 40(%eax), %edx; \ + movl 48(%eax), %ecx; \ + popl %eax; + + + +v3_svm_launch: + + ret + + +#endif + + +v3_stgi: + stgi; + ret; + +v3_clgi: + clgi; + ret; + +