From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [kvm-unit-tests] warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] Date: Tue, 15 Aug 2017 17:34:56 +0200 Message-ID: <20170815153456.GB6408@flask> References: <85823374-fbe4-50cd-060d-e0ebca4bd026@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, "Li, Philip" To: Li Zhijian Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42904 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751495AbdHOPe7 (ORCPT ); Tue, 15 Aug 2017 11:34:59 -0400 Content-Disposition: inline In-Reply-To: <85823374-fbe4-50cd-060d-e0ebca4bd026@intel.com> Sender: kvm-owner@vger.kernel.org List-ID: 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.