Created
September 2, 2016 20:25
-
-
Save iankronquist/d2e085b7c5b1cf4e517352913e9bdc3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00000000000000c0 <vmxoff>: | |
c0: e8 00 00 00 00 callq c5 <vmxoff+0x5> | |
c5: 55 push %rbp | |
c6: 48 89 e5 mov %rsp,%rbp | |
c9: 48 83 ec 10 sub $0x10,%rsp | |
cd: 65 48 8b 04 25 28 00 mov %gs:0x28,%rax | |
d4: 00 00 | |
d6: 48 89 45 f8 mov %rax,-0x8(%rbp) | |
da: 31 c0 xor %eax,%eax | |
dc: 0f 01 c4 vmxoff | |
df: 72 07 jb e8 <vmxoff+0x28> | |
e1: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%rbp) | |
e8: 48 8b 55 f8 mov -0x8(%rbp),%rdx | |
ec: 65 48 33 14 25 28 00 xor %gs:0x28,%rdx | |
f3: 00 00 | |
f5: 8b 45 f4 mov -0xc(%rbp),%eax | |
f8: 75 02 jne fc <vmxoff+0x3c> | |
fa: c9 leaveq | |
fb: c3 retq | |
fc: e8 00 00 00 00 callq 101 <vmxoff+0x41> | |
101: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) | |
106: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) | |
10d: 00 00 00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int vmxoff(void) { | |
int carry = 1; | |
asm volatile ( | |
"vmxoff ;" | |
"jc 1f ;" | |
"movl $0, %[xc] ;" | |
"1: ;" | |
: [xc] "=m" (carry) | |
: | |
: "cc"); | |
return carry; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment