From 294f6e7600d8c4f11c36d440b35f39226113a040 Mon Sep 17 00:00:00 2001 From: "iliya.saroukha" <iliya.saroukhanian@etu.hesge.ch> Date: Tue, 3 Dec 2024 16:44:20 +0100 Subject: [PATCH] fix: typos --- docs/re.md | 2 +- proto/hypervisor.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/re.md b/docs/re.md index 0ef0a6e..b4ecdd5 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 cca764d..71728b7 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 -- GitLab