Skip to content

Commit

Permalink
Fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
momo5502 committed Dec 10, 2023
1 parent 8d2b581 commit 7a7f757
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/driver/hypervisor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 7a7f757

Please sign in to comment.