diff --git a/docs/re.md b/docs/re.md index 0ef0a6ecfb5c6d1a2d14e895f311c6ef51843fe8..b4ecdd5e6f197ad2353a8277b0c92e70be19c3d7 100644 --- a/docs/re.md +++ b/docs/re.md @@ -100,7 +100,7 @@ throw an exception if this code is being executed from user-space. That's why this function can only be tested when being ran at the kernel level (e.g. ring 0). ```c -static void enable_vmx(void) { +static void cr4_enable_vmx(void) { unsigned long cr4; __asm__ volatile("mov %%cr4, %0" : "=r"(cr4)::"memory"); diff --git a/proto/hypervisor.c b/proto/hypervisor.c index cca764df5d1bf8d3de376e0e8858d69175d3fc85..71728b75695f58f60f811adb7600e74d2a6b8651 100644 --- a/proto/hypervisor.c +++ b/proto/hypervisor.c @@ -15,7 +15,7 @@ /* : clobbered registers list (optional)*/ /* );*/ -static void enable_vmx(void) { +static void cr4_enable_vmx(void) { unsigned long cr4; __asm__ volatile("mov %%cr4, %0" : "=r"(cr4)); @@ -59,7 +59,7 @@ static int my_init(void) { } printk(KERN_INFO "VMX is supported!\n"); - enable_vmx(); + cr4_enable_vmx(); printk(KERN_INFO "VMX has been successfully enabled!\n"); printk(KERN_INFO