From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB1l0-0005LU-Fe for qemu-devel@nongnu.org; Tue, 13 Jan 2015 08:43:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YB1kw-00043a-CC for qemu-devel@nongnu.org; Tue, 13 Jan 2015 08:43:42 -0500 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:39647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB1kw-00041k-4E for qemu-devel@nongnu.org; Tue, 13 Jan 2015 08:43:38 -0500 Received: by mail-wi0-f171.google.com with SMTP id bs8so21340607wib.4 for ; Tue, 13 Jan 2015 05:43:37 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54B52105.60009@redhat.com> Date: Tue, 13 Jan 2015 14:43:33 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] nested VMX with IA32_FEATURE_CONTROL MSR(addr: 0x3a) value of ZERO List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Huaicheng Li , qemu-devel@nongnu.org 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