3 #define KVM_HYPERCALL_INTEL ".byte 0x0f,0x01,0xc1"
4 #define KVM_HYPERCALL_AMD ".byte 0x0f,0x01,0xd9"
6 static inline long kvm_hypercall0_intel(unsigned int nr
)
9 asm volatile(KVM_HYPERCALL_INTEL
15 static inline long kvm_hypercall0_amd(unsigned int nr
)
18 asm volatile(KVM_HYPERCALL_AMD
24 int main(int ac
, char **av
)
26 kvm_hypercall0_intel(-1u);
27 printf("Hypercall via VMCALL: OK\n");
28 kvm_hypercall0_amd(-1u);
29 printf("Hypercall via VMMCALL: OK\n");