Last active
September 30, 2021 08:50
-
-
Save abenbachir/344822b5ba9fc5ac384cdec3f087e018 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