public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests] warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
@ 2017-08-15  8:39 Li Zhijian
  2017-08-15 15:34 ` Radim Krčmář
  2017-08-21  5:38 ` Li Zhijian
  0 siblings, 2 replies; 3+ messages in thread
From: Li Zhijian @ 2017-08-15  8:39 UTC (permalink / raw)
  To: kvm; +Cc: Li, Philip

Hi guys

i encountered a problem when i test vmx related cases

the test log like below
[adam@skylake kvm-unit-tests]$ ./run_tests.sh
SKIP vmx_null (0 tests)
[adam@skylake kvm-unit-tests]$ cat logs/
SUMMARY       vmx_null.log
[adam@skylake kvm-unit-tests]$ cat logs/vmx_null.log
warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
timeout -k 1s --foreground 90s /usr/bin/qemu-system-x86_64 -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel x86/vmx.flat -smp 1 -cpu host,+vmx -append null # -initrd /tmp/tmp.wTXf483ild
enabling apic
paging enabled
cr0 = 80010011
cr3 = 469000
cr4 = 20
WARNING: vmx not supported, add '-cpu host'
SUMMARY: 0 tests

why the test output this warning, my skylake i5-6500 machine can support vmx feature, and how i can fix it.
i tried the same test at my another haswell(i7-4790) machine(has the same kernel) doesn't occur this issue.

my test environmnet:
-------------------------------------
[adam@skylake kvm-unit-tests]$ qemu-system-x86_64 --version
QEMU emulator version 2.9.0
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

[adam@skylake kvm-unit-tests]$ git log |head -1
commit 9e5e817be8634bd9800253f404aa9d53d0742131

[adam@skylake kvm-unit-tests]$ uname -a
Linux skylake 4.12.0 #1 SMP Tue Aug 15 11:23:42 CST 2017 x86_64 GNU/Linux

[adam@skylake kvm-unit-tests]$ uname -a
Linux skylake 4.12.0 #1 SMP Tue Aug 15 11:23:42 CST 2017 x86_64 GNU/Linux
[adam@skylake kvm-unit-tests]$ lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               94
Model name:          Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
Stepping:            3
CPU MHz:             3600.000
CPU max MHz:         3600.0000
CPU min MHz:         800.0000
BogoMIPS:            6384.00
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            6144K
NUMA node0 CPU(s):   0-3
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
-------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [kvm-unit-tests] warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
  2017-08-15  8:39 [kvm-unit-tests] warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] Li Zhijian
@ 2017-08-15 15:34 ` Radim Krčmář
  2017-08-21  5:38 ` Li Zhijian
  1 sibling, 0 replies; 3+ messages in thread
From: Radim Krčmář @ 2017-08-15 15:34 UTC (permalink / raw)
  To: Li Zhijian; +Cc: kvm, Li, Philip

2017-08-15 16:39+0800, Li Zhijian:
> Hi guys
> 
> i encountered a problem when i test vmx related cases
> 
> the test log like below
> [adam@skylake kvm-unit-tests]$ ./run_tests.sh
> SKIP vmx_null (0 tests)
> [adam@skylake kvm-unit-tests]$ cat logs/
> SUMMARY       vmx_null.log
> [adam@skylake kvm-unit-tests]$ cat logs/vmx_null.log
> warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
> timeout -k 1s --foreground 90s /usr/bin/qemu-system-x86_64 -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel x86/vmx.flat -smp 1 -cpu host,+vmx -append null # -initrd /tmp/tmp.wTXf483ild
> enabling apic
> paging enabled
> cr0 = 80010011
> cr3 = 469000
> cr4 = 20
> WARNING: vmx not supported, add '-cpu host'
> SUMMARY: 0 tests
> 
> why the test output this warning, my skylake i5-6500 machine can support vmx feature, and how i can fix it.

The warning means that KVM doesn't allow the guest to see the vmx
feature.  You are most likely without nested vmx, because it is disabled
by default:

  % cat /sys/module/kvm_intel/parameters/nested
  N

In order to turn it on, reload the "kvm_intel" module with "nested=Y"
parameter.

 modprobe -r kvm_intel; modprobe kvm_intel nested=y

If you want to have this automatically, add

  options kvm_intel nested=1

to /etc/modprobe.d/kvm.conf.

> i tried the same test at my another haswell(i7-4790) machine(has the same kernel) doesn't occur this issue.

Not sure why it works on the other machine -- is it a different distro?

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [kvm-unit-tests] warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
  2017-08-15  8:39 [kvm-unit-tests] warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] Li Zhijian
  2017-08-15 15:34 ` Radim Krčmář
@ 2017-08-21  5:38 ` Li Zhijian
  1 sibling, 0 replies; 3+ messages in thread
From: Li Zhijian @ 2017-08-21  5:38 UTC (permalink / raw)
  To: rkrcmar; +Cc: kvm, Li, Philip

> >/Hi guys/ >// >/i encountered a problem when i test vmx related 
> cases/ >// >/the test log like below/ >/[adam@skylake kvm-unit-tests]$ 
> ./run_tests.sh/ >/SKIP vmx_null (0 tests)/ >/[adam@skylake 
> kvm-unit-tests]$ cat logs// >/SUMMARY vmx_null.log/ >/[adam@skylake 
> kvm-unit-tests]$ cat logs/vmx_null.log/ >/warning: host doesn't 
> support requested feature: CPUID.01H:ECX.vmx [bit 5]/ >/timeout -k 1s 
> --foreground 90s /usr/bin/qemu-system-x86_64 -nodefaults -device 
> pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none 
> -serial stdio -device pci-testdev -machine accel=kvm -kernel 
> x86/vmx.flat -smp 1 -cpu host,+vmx -append null # -initrd 
> /tmp/tmp.wTXf483ild/ >/enabling apic/ >/paging enabled/ >/cr0 = 
> 80010011/ >/cr3 = 469000/ >/cr4 = 20/ >/WARNING: vmx not supported, 
> add '-cpu host'/ >/SUMMARY: 0 tests/ >// >/why the test output this 
> warning, my skylake i5-6500 machine can support vmx feature, and how i 
> can fix it./ The warning means that KVM doesn't allow the guest to see 
> the vmx feature. You are most likely without nested vmx, because it is 
> disabled by default: % cat /sys/module/kvm_intel/parameters/nested N 
> In order to turn it on, reload the "kvm_intel" module with "nested=Y" 
> parameter. modprobe -r kvm_intel; modprobe kvm_intel nested=y

Thank you very much, it works for me


> If you want to have this automatically, add options kvm_intel nested=1 
> to /etc/modprobe.d/kvm.conf. >/i tried the same test at my another 
> haswell(i7-4790) machine(has the same kernel) doesn't occur this 
> issue./ Not sure why it works on the other machine -- is it a 
> different distro?
you are right, the skylake is Archlinux while the haswell is Ubuntu.


Thanks
Zhijian



> Thanks. 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-21  5:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-15  8:39 [kvm-unit-tests] warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] Li Zhijian
2017-08-15 15:34 ` Radim Krčmář
2017-08-21  5:38 ` Li Zhijian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox