11 #define SVM_ERROR .dword 0xffffffff
12 #define SVM_SUCCESS .dword 0x00000000
14 #define vmrun .byte 0x0f,0x01,0xd8
15 #define vmload .byte 0x0F,0x01,0xDA
16 #define vmsave .byte 0x0F,0x01,0xDB
17 #define stgi .byte 0x0F,0x01,0xDC
18 #define clgi .byte 0x0F,0x01,0xDD
23 #define Save_SVM_Registers(location) \
25 movl location, %eax; \
28 movl %ebp, 16(%eax); \
30 movl %ebx, 32(%eax); \
31 movl %edx, 40(%eax); \
32 movl %ecx, 48(%eax); \
35 movl %ebx, 56(%eax); \
40 #define Restore_SVM_Registers(location) \
42 movl location, %eax; \
45 movl 16(%eax), %ebp; \
46 movl 32(%eax), %ebx; \
47 movl 40(%eax), %edx; \
48 movl 48(%eax), %ecx; \
63 Restore_SVM_Registers(8(%esp));
70 Save_SVM_Registers(4(%esp));
85 #define Save_SVM_Registers(location) \
102 #define Restore_SVM_Registers(location) \
104 mov location, %rax; \
107 mov 16(%rax), %rbp; \
108 mov 32(%rax), %rbx; \
109 mov 40(%rax), %rdx; \
110 mov 48(%rax), %rcx; \
149 Restore_SVM_Registers(%rsi);
159 Save_SVM_Registers(8(%rsp));