Fix compilation

This commit is contained in:
momo5502 2023-12-10 09:45:17 +01:00
parent 8d2b581adf
commit 7a7f757f09

View File

@ -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()); debug_log("Enabling hypervisor on core %d\n", thread::get_processor_index());
auto* vm_state = this->get_current_vm_state(); 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"); 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.launched = false;
vm_state->launch_context.system_directory_table_base = system_directory_table_base; vm_state->launch_context.system_directory_table_base = system_directory_table_base;