Skip to content

Instantly share code, notes, and snippets.

@iankronquist
Created September 2, 2016 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iankronquist/d2e085b7c5b1cf4e517352913e9bdc3a to your computer and use it in GitHub Desktop.
Save iankronquist/d2e085b7c5b1cf4e517352913e9bdc3a to your computer and use it in GitHub Desktop.
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
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