From 7a7f757f09775fdd752e408c9efca0f5dcf9177e Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sun, 10 Dec 2023 09:45:17 +0100 Subject: [PATCH] Fix compilation --- src/driver/hypervisor.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/driver/hypervisor.cpp b/src/driver/hypervisor.cpp index e586b7d..1c66d98 100644 --- a/src/driver/hypervisor.cpp +++ b/src/driver/hypervisor.cpp @@ -742,11 +742,16 @@ void hypervisor::enable_core(const uint64_t system_directory_table_base) debug_log("Enabling hypervisor on core %d\n", thread::get_processor_index()); auto* vm_state = this->get_current_vm_state(); - if (!is_virtualization_supported()) + if (!is_vmx_supported()) { throw std::runtime_error("VMX not supported on this core"); } + if (!is_vmx_available()) + { + throw std::runtime_error("VMX not available on this core"); + } + vm_state->launch_context.launched = false; vm_state->launch_context.system_directory_table_base = system_directory_table_base;