Skip to content

NOVA doesn't detect VMX capability when running in KVM #1

@blitz

Description

@blitz

The IA32_FEATURE_CONTROL MSR in KVM is not implemented. See vmx_get_vmx_msr and vmx_set_vmx_msr in the Linux kernel code.

Quick workaround:

diff --git a/src/vmx.cpp b/src/vmx.cpp
index 4835dc1..fcd9a5f 100644
--- a/src/vmx.cpp
+++ b/src/vmx.cpp
@@ -101,7 +101,7 @@ Vmcs::Vmcs (mword esp, mword bmp, mword cr3, uint64 eptp) : rev (basic.revision)

 void Vmcs::init()
 {
-    if (!Cpu::feature (Cpu::FEAT_VMX) || (Msr::read<uint32>(Msr::IA32_FEATURE_CONTROL) & 0x5) != 0x5) {
+    if (!Cpu::feature (Cpu::FEAT_VMX)) {
         Hip::remove (Hip::FEAT_VMX);
         return;
     }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions