On 19.06.2013 16:38, Gleb Natapov wrote: > On Wed, Jun 19, 2013 at 04:12:04PM +0200, Stefan Pietsch wrote: >> On 19.06.2013 15:41, Gleb Natapov wrote: >>> On Sun, Jun 16, 2013 at 02:25:04AM +0200, Stefan Pietsch wrote: >>>> >>>> first bad commit: [25391454e73e3156202264eb3c473825afe4bc94] >>>> KVM: VMX: don't clobber segment AR of unusable segments. >>>> >>>> >>>> 25391454e73e3156202264eb3c473825afe4bc94 >>>> emulate_invalid_guest_state=0 -> hangs and shows "KVM: entry failed" >>>> emulate_invalid_guest_state=1 -> hangs >>>> >>> With emulate_invalid_guest_state=1 the commit does nothing. Can you >>> double check that 218e763f458c44f30041c1b48b4371e130fd4317 works for you >>> with emulate_invalid_guest_state=1? >> >> >> 218e763f458c44f30041c1b48b4371e130fd4317 >> emulate_invalid_guest_state=0 -> works >> emulate_invalid_guest_state=1 -> hangs >> >> 25391454e73e3156202264eb3c473825afe4bc94 broke >> emulate_invalid_guest_state=0. > Can you provide the output of 25391454e73e3156202264eb3c473825afe4bc94 > and emulate_invalid_guest_state=0. Also run "x/20i $pc-20" in qemu > monitor after the hang. 25391454e73e3156202264eb3c473825afe4bc94 emulate_invalid_guest_state=0 (qemu) info registers EAX=00000000 EBX=00000001 ECX=fffff000 EDX=fffff000 ESI=00195e93 EDI=00000000 EBP=de84c000 ESP=de84df64 EIP=c101611c EFL=00010246 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =007b 00000000 ffffffff 00c0f300 DPL=3 DS [-WA] CS =0060 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA] SS =0068 00000000 ffffffff 00c09300 DPL=0 DS [-WA] DS =007b 00000000 ffffffff 00c0f300 DPL=3 DS [-WA] FS =0000 ffff0000 f0000fff 00f0ff00 DPL=3 CS64 [CRA] GS =00e0 c1438b40 00000018 00409100 DPL=0 DS [--A] LDT=0000 ffff0000 f0000fff 00f0ff00 DPL=3 CS64 [CRA] TR =0080 c1400f00 0000206b 00008b00 DPL=0 TSS32-busy GDT= c13f6000 000000ff IDT= c13f5000 000007ff CR0=8005003b CR2=ffffffff CR3=014bc000 CR4=00000690 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000700000000 DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400 EFER=0000000000000000 FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80 FPR0=f44d002c60000000 400d FPR1=80847fe700000000 400e FPR2=fa007fa240000000 400e FPR3=80e88055f0000000 400e FPR4=ea61009c40000000 400d FPR5=ea62009c40000000 400c FPR6=800bf60000000000 4015 FPR7=0000000000000000 0000 XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000 XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000 XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000 XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000 (qemu) x/20i $pc-20 0x00000000c1016108: (bad) 0x00000000c1016109: decl 0x158bc310(%ecx) 0x00000000c101610f: les -0x7b723ec0(%ebx),%eax 0x00000000c1016115: adc %al,(%eax) 0x00000000c1016117: sar $0xff,%bh 0x00000000c101611a: mov (%eax),%eax 0x00000000c101611c: ret 0x00000000c101611d: jmp 0xc1016121 0x00000000c101611f: pause 0x00000000c1016121: mov (%eax),%edx 0x00000000c1016123: test %edx,%edx 0x00000000c1016125: je 0xc101611f 0x00000000c1016127: ret 0x00000000c1016128: cmp $0xfe,%eax 0x00000000c101612d: setle %al 0x00000000c1016130: movzbl %al,%eax 0x00000000c1016133: ret 0x00000000c1016134: mov 0xc1407b64,%edx 0x00000000c101613a: mov $0x20,%eax 0x00000000c101613f: call *0x9c(%edx) last 20 lines of the trace: qemu-system-x86-4042 [000] 295.592694: vcpu_match_mmio: gva 0xffffb0d0 gpa 0xfee000d0 Read GVA qemu-system-x86-4042 [000] 295.592694: kvm_apic: apic_read APIC_LDR = 0x1000000 qemu-system-x86-4042 [000] 295.592695: kvm_mmio: mmio read len 4 gpa 0xfee000d0 val 0x1000000 qemu-system-x86-4042 [000] 295.592696: kvm_entry: vcpu 0 qemu-system-x86-4042 [000] 295.592699: kvm_exit: reason EXCEPTION_NMI rip 0xc101611a info ffffb080 80000b0e qemu-system-x86-4042 [000] 295.592700: kvm_page_fault: address ffffb080 error_code 9 qemu-system-x86-4042 [000] 295.592701: kvm_emulate_insn: 0:c101611a:8b 00 (prot32) qemu-system-x86-4042 [000] 295.592702: vcpu_match_mmio: gva 0xffffb080 gpa 0xfee00080 Read GVA qemu-system-x86-4042 [000] 295.592703: kvm_apic: apic_read APIC_TASKPRI = 0x0 qemu-system-x86-4042 [000] 295.592703: kvm_mmio: mmio read len 4 gpa 0xfee00080 val 0x0 qemu-system-x86-4042 [000] 295.592704: kvm_userspace_exit: reason KVM_EXIT_TPR_ACCESS (12) qemu-system-x86-4042 [000] 295.592805: kvm_entry: vcpu 0 qemu-system-x86-4042 [000] 295.592808: kvm_exit: reason rip 0xc101611c info 0 80000b0e qemu-system-x86-4042 [000] 295.592809: kvm_userspace_exit: reason KVM_EXIT_FAIL_ENTRY (9) qemu-system-x86-4040 [001] 295.594993: kvm_set_irq: gsi 0 level 1 source 0 qemu-system-x86-4040 [001] 295.594995: kvm_pic_set_irq: chip 0 pin 0 (edge) qemu-system-x86-4040 [001] 295.594997: kvm_ioapic_set_irq: pin 2 dst 0 vec=0 (Fixed|physical|edge|masked) qemu-system-x86-4040 [001] 295.594998: kvm_set_irq: gsi 0 level 0 source 0 qemu-system-x86-4040 [001] 295.594998: kvm_pic_set_irq: chip 0 pin 0 (edge) qemu-system-x86-4040 [001] 295.594999: kvm_ioapic_set_irq: pin 2 dst 0 vec=0 (Fixed|physical|edge|masked) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html