Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
blitz opened this issue Nov 7, 2012 · 2 comments
Open

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

blitz opened this issue Nov 7, 2012 · 2 comments

Comments

@blitz
Copy link

blitz commented Nov 7, 2012

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;
     }
@udosteinberg
Copy link

VMXON is spec'd to read IA32_FEATURE_CONTROL MSR (see pseudocode in the SDM), so if KVM is not reading (or not even implementing) that MSR, it's not working according to the specification.

@blitz
Copy link
Author

blitz commented Nov 28, 2012

I know. This bug just remembers the workaround for that until it is fixed in kvm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants