From: bugzilla-daemon@bugzilla.kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 106621] New: Failure to install Hyper-V role on nested KVM guest
Date: Mon, 26 Oct 2015 12:57:02 +0000 [thread overview]
Message-ID: <bug-106621-28872@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=106621
Bug ID: 106621
Summary: Failure to install Hyper-V role on nested KVM guest
Product: Virtualization
Version: unspecified
Kernel Version: 4.3.0-rc7
Hardware: x86-64
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: kvm
Assignee: virtualization_kvm@kernel-bugs.osdl.org
Reporter: Rainmaker52@gmail.com
Regression: No
When installing the Hyper-V role on a Windows guest (tried 2008 R2, 2012 R2 and
2016 TP3), the Windows installer refuses to install because of the error
"Hyper-V cannot be installed because virtualization support is not enabled in
the BIOS."
This is because the MSR 0x3a is initialized to "0".
When VMX is activated on the guest CPU, the 0x3a register should return "5".
The following code patch (may be a bit of an overstatement) returns "5" if VMX
is set on the guest CPU, thereby reporting to the guest that visualization is
enabled in the BIOS.
--- a/arch/x86/kvm/vmx.c 2015-10-25 02:39:47.000000000 +0100
+++ b/arch/x86/kvm/vmx.c 2015-10-26 13:35:51.894700786 +0100
@@ -2661,7 +2661,12 @@
case MSR_IA32_FEATURE_CONTROL:
if (!nested_vmx_allowed(vcpu))
return 1;
- msr_info->data = to_vmx(vcpu)->nested.msr_ia32_feature_control;
+ if (nested_vmx_allowed(vcpu)) {
+ //Set all 3 bits in 0x3a
+ msr_info->data = 5;
+ } else {
+ msr_info->data = to_vmx(vcpu)->nested.msr_ia32_feature_control;
+ }
break;
case MSR_IA32_VMX_BASIC ... MSR_IA32_VMX_VMFUNC:
if (!nested_vmx_allowed(vcpu))
This, together with "-cpu host,-hypervisor,+vmx will allow Hyper-V to be
installed. It will however not allow to start these Virtual Machines.
--
You are receiving this mail because:
You are watching the assignee of the bug.
next reply other threads:[~2015-10-26 12:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 12:57 bugzilla-daemon [this message]
2017-02-14 17:14 ` [Bug 106621] Failure to install Hyper-V role on nested KVM guest bugzilla-daemon
2017-02-14 17:21 ` bugzilla-daemon
2017-02-14 17:51 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-106621-28872@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).