From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVIIR-0006RT-26 for qemu-devel@nongnu.org; Mon, 05 Nov 2012 03:44:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVIIK-0006F0-JT for qemu-devel@nongnu.org; Mon, 05 Nov 2012 03:44:39 -0500 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:44642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVIIJ-00067x-Gw for qemu-devel@nongnu.org; Mon, 05 Nov 2012 03:44:32 -0500 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 5 Nov 2012 14:14:25 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qA58iMT432833602 for ; Mon, 5 Nov 2012 14:14:23 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qA5EE34A002149 for ; Tue, 6 Nov 2012 01:14:03 +1100 Message-ID: <50977C65.7020201@linux.vnet.ibm.com> Date: Mon, 05 Nov 2012 16:44:21 +0800 From: Sheldon MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020808080207000702050609" Subject: [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 This is a multi-part message in MIME format. --------------020808080207000702050609 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi all, There is a 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. $ 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 --------------020808080207000702050609 Content-Type: text/x-log; name="qemu.log" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="qemu.log" 2012-11-01 09:48:17.317+0000: starting up LC_ALL=3DC PATH=3D/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_= AUDIO_DRV=3Dnone /usr/bin/qemu-kvm -name guest1 -S -M pc-0.14 -cpu Westme= re -enable-kvm -m 1024 -smp 1,sockets=3D1,cores=3D1,threads=3D1 -uuid bd1= ed1d6-28c9-45f0-92c2-7b133243fe51 -smbios type=3D1,manufacturer=3DoVirt,p= roduct=3DoVirt Node,version=3D17-1,serial=3D2D138CD3-67D1-3683-8B45-55F8B= 68CF49C_52:54:00:26:7c:bf,uuid=3Dbd1ed1d6-28c9-45f0-92c2-7b133243fe51 -no= -user-config -nodefaults -chardev socket,id=3Dcharmonitor,path=3D/var/lib= /libvirt/qemu/guest1.monitor,server,nowait -mon chardev=3Dcharmonitor,id=3D= monitor,mode=3Dcontrol -rtc base=3D2012-10-31T21:48:17,driftfix=3Dslew -n= o-shutdown -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 -de= vice virtio-serial-pci,id=3Dvirtio-serial0,bus=3Dpci.0,addr=3D0x4 -drive = file=3D/rhev/data-center/67481e14-48a2-4879-a23b-09820c56c840/f464cd45-d7= 25-43bf-a3b3-0bc28f5706aa/images/11111111-1111-1111-1111-111111111111/RHE= L6.3-20120531.0-Server-x86_64-DVD1.iso,if=3Dnone,id=3Ddrive-ide0-1-0,read= only=3Don,format=3Draw,serial=3D -device ide-cd,bus=3Dide.1,unit=3D0,driv= e=3Ddrive-ide0-1-0,id=3Dide0-1-0,bootindex=3D1 -drive file=3D/rhev/data-c= enter/67481e14-48a2-4879-a23b-09820c56c840/d0dc2048-cc38-42c2-ae3b-c716bb= 7e6c89/images/1d7bcfe8-da26-4299-888f-c1add2477485/7df2f9b0-99e4-4c9d-8e1= e-6fb845517943,if=3Dnone,id=3Ddrive-virtio-disk0,format=3Dqcow2,serial=3D= 1d7bcfe8-da26-4299-888f-c1add2477485,cache=3Dnone,werror=3Dstop,rerror=3D= stop,aio=3Dnative -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x= 5,drive=3Ddrive-virtio-disk0,id=3Dvirtio-disk0 -netdev tap,fd=3D28,id=3Dh= ostnet0,vhost=3Don,vhostfd=3D29 -device virtio-net-pci,netdev=3Dhostnet0,= id=3Dnet0,mac=3D00:1a:4a:a8:7a:09,bus=3Dpci.0,addr=3D0x3 -chardev socket,= id=3Dcharchannel0,path=3D/var/lib/libvirt/qemu/channels/guest1.com.redhat= =2Erhevm.vdsm,server,nowait -device virtserialport,bus=3Dvirtio-serial0.0= ,nr=3D1,chardev=3Dcharchannel0,id=3Dchannel0,name=3Dcom.redhat.rhevm.vdsm= -chardev socket,id=3Dcharchannel1,path=3D/var/lib/libvirt/qemu/channels/= guest1.org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=3D= virtio-serial0.0,nr=3D2,chardev=3Dcharchannel1,id=3Dchannel1,name=3Dorg.q= emu.guest_agent.0 -chardev pty,id=3Dcharconsole0 -device virtconsole,char= dev=3Dcharconsole0,id=3Dconsole0 -device usb-tablet,id=3Dinput0 -vnc 0:0,= password -k en-us -vga cirrus -device virtio-balloon-pci,id=3Dballoon0,bu= s=3Dpci.0,addr=3D0x6 char device redirected to /dev/pts/0 KVM: entry failed, hardware error 0x7 RAX=3D000000000000000f RBX=3D000000000000038f RCX=3D000000000000038f RDX=3D= 0000000000000000 RSI=3D000000000000000f RDI=3D000000000000038f RBP=3Dffff88003d2f5a90 RSP=3D= ffff88003d2f5a90 R8 =3D0000000000000000 R9 =3D0000000000000001 R10=3D0000000000000001 R11=3D= 0000000000000001 R12=3Dffffffff81602880 R13=3D0000000000000000 R14=3D0000000000000000 R15=3D= ffff88003d2f5adc RIP=3Dffffffff8103890a RFL=3D00000046 [---Z-P-] CPL=3D0 II=3D0 A20=3D1 SM= M=3D0 HLT=3D0 ES =3D0018 0000000000000000 ffffffff 00c09300 DPL=3D0 DS [-WA] CS =3D0010 0000000000000000 ffffffff 00a09b00 DPL=3D0 CS64 [-RA] SS =3D0018 0000000000000000 ffffffff 00c09300 DPL=3D0 DS [-WA] DS =3D0018 0000000000000000 ffffffff 00c09300 DPL=3D0 DS [-WA] FS =3D0000 0000000000000000 000fffff 00000000 GS =3D0000 ffff880002200000 000fffff 00000000 LDT=3D0000 0000000000000000 000fffff 00000000 TR =3D0040 ffff880002214200 00002087 00008b00 DPL=3D0 TSS64-busy GDT=3D ffff880002204000 0000007f IDT=3D ffffffff81dd7000 00000fff CR0=3D8005003b CR2=3D0000000000000000 CR3=3D0000000001a85000 CR4=3D000006= f0 DR0=3D0000000000000000 DR1=3D0000000000000000 DR2=3D0000000000000000 DR3=3D= 0000000000000000=20 DR6=3D00000000ffff0ff0 DR7=3D0000000000000400 EFER=3D0000000000000d01 Code=3D66 2e 0f 1f 84 00 00 00 00 00 55 89 f0 89 f9 48 89 e5 0f 30 <31> c= 0 c9 c3 66 90 55 48 89 e5 0f 1f 44 00 00 89 f9 0f 33 89 c7 48 89 d0 48 c1= e0 20 89 f9 --------------020808080207000702050609--