* [Qemu-devel] nested VMX with IA32_FEATURE_CONTROL MSR(addr: 0x3a) value of ZERO
@ 2015-01-13 13:19 Huaicheng Li
2015-01-13 13:43 ` Paolo Bonzini
0 siblings, 1 reply; 3+ messages in thread
From: Huaicheng Li @ 2015-01-13 13:19 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]
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)
* 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.
--
Best Regards
Huaicheng Li
[-- Attachment #2: Type: text/html, Size: 1882 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] nested VMX with IA32_FEATURE_CONTROL MSR(addr: 0x3a) value of ZERO
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
2015-01-13 14:44 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2015-01-13 13:43 UTC (permalink / raw)
To: Huaicheng Li, qemu-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] nested VMX with IA32_FEATURE_CONTROL MSR(addr: 0x3a) value of ZERO
2015-01-13 13:43 ` Paolo Bonzini
@ 2015-01-13 14:44 ` Jan Kiszka
0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2015-01-13 14:44 UTC (permalink / raw)
To: Paolo Bonzini, Huaicheng Li, qemu-devel
On 2015-01-13 14:43, Paolo Bonzini wrote:
>
>
> 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.
...and lots of other nvmx bugs were fixed afterwards. If you don't want
to debug KVM but your hypervisor, use the latest stable kernel,
currently 3.18.2.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-13 14:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-01-13 14:44 ` Jan Kiszka
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).