From 8d2b581adf7a6884e2ce2a1ec74e3b33f2192812 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sun, 10 Dec 2023 09:40:41 +0100 Subject: [PATCH] Small fixes --- src/driver/hypervisor.cpp | 12 ++++++------ src/library/main.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/driver/hypervisor.cpp b/src/driver/hypervisor.cpp index 26abfcf..e586b7d 100644 --- a/src/driver/hypervisor.cpp +++ b/src/driver/hypervisor.cpp @@ -30,11 +30,6 @@ namespace return feature_control.lock_bit && feature_control.enable_vmx_outside_smx; } - bool is_virtualization_supported() - { - return is_vmx_supported() && is_vmx_available(); - } - bool is_hypervisor_present() { cpuid_eax_01 data{}; @@ -129,11 +124,16 @@ hypervisor::hypervisor() instance = this; - if (!is_virtualization_supported()) + if (!is_vmx_supported()) { throw std::runtime_error("VMX not supported on this machine"); } + if (!is_vmx_available()) + { + throw std::runtime_error("VMX not available on this machine"); + } + debug_log("VMX supported!\n"); this->allocate_vm_states(); this->enable(); diff --git a/src/library/main.cpp b/src/library/main.cpp index 6159cd2..f9336ed 100644 --- a/src/library/main.cpp +++ b/src/library/main.cpp @@ -37,7 +37,7 @@ namespace driver create_driver() { - return driver{std::filesystem::absolute(DRIVER_NAME), "HyperHook"}; + return driver{std::filesystem::absolute(DRIVER_NAME), "HyperHookDriver"}; } driver_device& get_driver_device()