-
-
Save richinseattle/c06d04e3e77cb4be2301a815427af058 to your computer and use it in GitHub Desktop.
Emitting hypercall in c
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
#define do_hypercall(nr, p1, p2, p3, p4) \ | |
__asm__ __volatile__(".byte 0x0F,0x01,0xC1\n"::"a"(nr), \ | |
"b"(p1), \ | |
"c"(p2), \ | |
"d"(p3), \ | |
"S"(p4)) | |
void main() | |
{ | |
do_hypercall(100, 0, 0, 0, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment