From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVILu-0007St-Tm for qemu-devel@nongnu.org; Mon, 05 Nov 2012 03:48:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVILt-00079t-Ig for qemu-devel@nongnu.org; Mon, 05 Nov 2012 03:48:14 -0500 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:52655) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVILs-00079i-Qv for qemu-devel@nongnu.org; Mon, 05 Nov 2012 03:48:13 -0500 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 5 Nov 2012 14:18:07 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qA58m4gm41615466 for ; Mon, 5 Nov 2012 14:18:04 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qA58m4WG031690 for ; Mon, 5 Nov 2012 19:48:04 +1100 Message-ID: <50977D44.8050209@linux.vnet.ibm.com> Date: Mon, 05 Nov 2012 16:48:04 +0800 From: Sheldon MIME-Version: 1.0 References: <50977C65.7020201@linux.vnet.ibm.com> In-Reply-To: <50977C65.7020201@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [help] error: when install on nest-kvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Adam Litke On 11/05/2012 04:44 PM, Sheldon wrote: > Hi all, > > There is an error when I install a RHEL or FC17 os on my nest-kvm. > > I find some error in the qemu log( attachment) as follow: > KVM: entry failed, hardware error 0x7 > > > so I check the related code in kvm.c. > > int kvm_arch_handle_exit(CPUX86State *env, struct kvm_run *run) > { > uint64_t code; > int ret; > > switch (run->exit_reason) { > ... > case KVM_EXIT_FAIL_ENTRY: > code = run->fail_entry.hardware_entry_failure_reason; > fprintf(stderr, "KVM: entry failed, hardware error 0x%" PRIx64 "\n", > code); > if (host_supports_vmx() && code == VMX_INVALID_GUEST_STATE) { > fprintf(stderr, > "\nIf you're running a guest on an Intel machine without " > "unrestricted mode\n" > "support, the failure can be most likely due to the guest " > "entering an invalid\n" > "state for Intel VT. For example, the guest maybe running " > "in big real mode\n" > "which is not supported on less recent Intel processors." > "\n\n"); > } > ret = -1; > break; > case KVM_EXIT_EXCEPTION: > ... > } > > From the code, I'm not sure error is caused by nest kvm. > for the hardware_entry_failure_reason is 0x7 not VMX_INVALID_GUEST_STATE. > but I'm not find where the hardware_entry_failure_reason is set. I > doubt it is set by KVM module in kernel. > > here is the environment: > the guest hypervisor, a nest-kvm VM, OS is 3.6.1-1.fc17.x86_64. And it > does support VT. sorry the OS is 3.6.2-4.fc17.x86_64. not 3.6.1-1.fc17.x86_64. > $ sudo cat /proc/cpuinfo |grep vmx > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge > mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb > rdtscp lm constant_tsc arch_perfmon rep_good nopl pni pclmulqdq vmx > ssse3 cx16 sse4_1 sse4_2 popcnt aes hypervisor lahf_lm > > The host: OS is 3.6.1-1.fc17.x86_64. CPU is Intel(R) Xeon(R) CPU > X5650. The host also opens the nested switch. > $ cat /sys/module/kvm_intel/parameters/nested > Y > -- Sheldon Feng(冯少合) IBM Linux Technology Center