qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Huaicheng Li <lhcwhu@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] nested VMX with IA32_FEATURE_CONTROL MSR(addr: 0x3a) value of ZERO
Date: Tue, 13 Jan 2015 14:43:33 +0100	[thread overview]
Message-ID: <54B52105.60009@redhat.com> (raw)
In-Reply-To: <CANr0WEcO3mQCUp4YWm7yo1DFeQd=DNf_g8mRAUCR-jC5u5UDPA@mail.gmail.com>



On 13/01/2015 14:19, Huaicheng Li wrote:
> Hi, all
> 
> I have a Linux 3.8 kernel (host) and run QEMU 1.5.3 on it. I want to
> test another hypervisor software in qemu so I enabled KVM's nested VMX
> function(by passing "nested=1" parameter to the kvm module) and then
> started a guest machine. In the guest, I could see the "vmx" instruction
> set by reading /proc/cpuinfo and the kvm module can be correctly
> inserted. But when I read the value of the IA32_FEATURE_CONTROL MSR
> using msr-tools, it showed _0_, but the correct value should be _5_,
> since bit 0(virtualization lock bit) and bit 2 of that MSR must be set
> to enable the virtualization functionality. But in my vmware workstation
> guest with nested virtualization enabled, the value of that MSR is,
> indeed, _5_ as well as in the physical machine (of course). Here, I want
> to ask
> 
> * Am I missing anything in my operation to totally enable the nested
> virtualization function ?? (I googled a lot and it seemed there were no
> additional steps) 

You have an old kernel.  IA32_FEATURE_CONTROL MSR emulation was added in
3.12.

> * Since the IA32_FEATURE_CONTROL MSR value should be set in BIOS and are
> kept unchanged during the runtime, is there any modified BIOS that qemu
> can use to enable the setting ?? Currently my qemu use the default one.

This is a bug in your hypervisor.  It should be ready to set bit 0 and
optionally bit 2 of IA32_FEATURE_CONTROL, if it sees
IA32_FEATURE_CONTROL = 0.

Paolo

  reply	other threads:[~2015-01-13 13:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 13:19 [Qemu-devel] nested VMX with IA32_FEATURE_CONTROL MSR(addr: 0x3a) value of ZERO Huaicheng Li
2015-01-13 13:43 ` Paolo Bonzini [this message]
2015-01-13 14:44   ` Jan Kiszka

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=54B52105.60009@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=lhcwhu@gmail.com \
    --cc=qemu-devel@nongnu.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).