今天的废话就说了这么一点,不算多的,哈哈。下面进入正题,今天咱们讲一下Linux下的Hypercall,幕后的黑手其实是某特尔处理器的VMCALL指令咯,手册里说得也不怎么详细,只给了op code:0F 01 C1 -- VMCALL Call to VM monitor by causing VM exit. 如此简洁颇具大家风范,嘿嘿 然后,然后注意Linux kernel source code下的这个文件,3.10的arch/x86/include/asm/kvm_para.h第19行:
/* This instruction is vmcall. On non-VT architectures, it will generate a * trap that we will then rewrite to the appropriate instruction. */ #define KVM_HYPERCALL ".byte 0x0f,0x01,0xc1"