* KVM on Via Nano (Isaiah) CPUs? @ 2009-02-16 13:45 Craig Metz 2009-04-01 16:30 ` Avi Kivity 0 siblings, 1 reply; 23+ messages in thread From: Craig Metz @ 2009-02-16 13:45 UTC (permalink / raw) To: kvm Has anyone (esp. the KVM core developers) tried to determine whether KVM works on the new Via Nano CPUs? They claim to support the Intel-style VT-x instruction set extensions and show up in cpuinfo that way. But, according to some Google searching, folks who have tried to use KVM (or Hyper-V) have not been succesful. It's not clear if this is a CPU implementation problem and/or something that needs more work in KVM. Has anyone tried this / debugged this? Thanks, -Craig ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? 2009-02-16 13:45 KVM on Via Nano (Isaiah) CPUs? Craig Metz @ 2009-04-01 16:30 ` Avi Kivity 2009-05-08 19:16 ` Craig Metz 0 siblings, 1 reply; 23+ messages in thread From: Avi Kivity @ 2009-04-01 16:30 UTC (permalink / raw) To: Craig Metz; +Cc: kvm, andreas.tanz Craig Metz wrote: > Has anyone (esp. the KVM core developers) tried to determine whether KVM > works on the new Via Nano CPUs? They claim to support the Intel-style VT-x > instruction set extensions and show up in cpuinfo that way. But, according to > some Google searching, folks who have tried to use KVM (or Hyper-V) have not > been succesful. It's not clear if this is a CPU implementation problem and/or > something that needs more work in KVM. > Via engineers have contacted me and confirmed that this is a problem in the processor. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? 2009-04-01 16:30 ` Avi Kivity @ 2009-05-08 19:16 ` Craig Metz 2009-05-09 9:32 ` Avi Kivity 0 siblings, 1 reply; 23+ messages in thread From: Craig Metz @ 2009-05-08 19:16 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm, andreas.tanz In message <49D396AB.6090304@redhat.com>, you write: >Via engineers have contacted me and confirmed that this is a problem in >the processor. Is there a known-fixed CPU revision? Is there a way to identify working vs. non-working chips, either from IC stamp or from /proc/cpuinfo? (Bonus: is it possible to put a check and an error into the kvm-intel kernel model?) Thanks, -Craig ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? 2009-05-08 19:16 ` Craig Metz @ 2009-05-09 9:32 ` Avi Kivity 2009-05-12 6:48 ` KVM on Via Nano (Isaiah) CPUs? <Virus checked> Andreas Tanz 0 siblings, 1 reply; 23+ messages in thread From: Avi Kivity @ 2009-05-09 9:32 UTC (permalink / raw) To: Craig Metz; +Cc: kvm, andreas.tanz Craig Metz wrote: > In message <49D396AB.6090304@redhat.com>, you write: > >> Via engineers have contacted me and confirmed that this is a problem in >> the processor. >> > > Is there a known-fixed CPU revision? > > Is there a way to identify working vs. non-working chips, either from IC > stamp or from /proc/cpuinfo? (Bonus: is it possible to put a check and an error > into the kvm-intel kernel model?) > I have no idea. Please contact Via for this information. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-05-09 9:32 ` Avi Kivity @ 2009-05-12 6:48 ` Andreas Tanz 2009-05-12 6:50 ` Avi Kivity 0 siblings, 1 reply; 23+ messages in thread From: Andreas Tanz @ 2009-05-12 6:48 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm, Craig Metz > Craig Metz wrote: > > In message <49D396AB.6090304@redhat.com>, you write: > > > >> Via engineers have contacted me and confirmed that this is a problem in > >> the processor. > >> > > > > Is there a known-fixed CPU revision? > > > > Is there a way to identify working vs. non-working chips, either from IC > > stamp or from /proc/cpuinfo? (Bonus: is it possible to put a check and an error > > into the kvm-intel kernel model?) > > > > I have no idea. Please contact Via for this information. > Hi, I've read an EMail from VIA, telling that the Nano must be at least stepping 3. Prior steppings have a buggy vt implementation... (Damn! I have stepping 2 :-I ) ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-05-12 6:48 ` KVM on Via Nano (Isaiah) CPUs? <Virus checked> Andreas Tanz @ 2009-05-12 6:50 ` Avi Kivity 0 siblings, 0 replies; 23+ messages in thread From: Avi Kivity @ 2009-05-12 6:50 UTC (permalink / raw) To: andreas.tanz; +Cc: kvm, Craig Metz Andreas Tanz wrote: >> Craig Metz wrote: >> >>> In message <49D396AB.6090304@redhat.com>, you write: >>> >>> >>>> Via engineers have contacted me and confirmed that this is a problem in >>>> the processor. >>>> >>>> >>> Is there a known-fixed CPU revision? >>> >>> Is there a way to identify working vs. non-working chips, either from IC >>> stamp or from /proc/cpuinfo? (Bonus: is it possible to put a check and an error >>> into the kvm-intel kernel model?) >>> >>> >> I have no idea. Please contact Via for this information. >> >> > > Hi, > > I've read an EMail from VIA, telling that the Nano must be at least stepping 3. > Prior steppings have a buggy vt implementation... > (Damn! I have stepping 2 :-I ) > Can you send your /proc/cpuinfo, I'll try to blacklist it. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <200903180902.29139.andreas.tanz@kvt.de>]
[parent not found: <200903181810.48603.andreas.tanz@kvt.de>]
[parent not found: <49C20DEE.9040302@redhat.com>]
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> [not found] ` <49C20DEE.9040302@redhat.com> @ 2009-03-19 10:55 ` Andreas Tanz 2009-03-19 12:25 ` Avi Kivity 0 siblings, 1 reply; 23+ messages in thread From: Andreas Tanz @ 2009-03-19 10:55 UTC (permalink / raw) To: kvm, Avi Kivity Hi! > > > > The guest starts up showing the Bochs BIOS POST and stucks giving thousands of lines : > > [15013.656923] returning from kvm_handle_exit, cause 3, retval = 1 > > > > > > What was the value of exit_reason? > kernel/x86/vmx.c: 3211 static int kvm_handle_exit(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) 3212 { ... 3273 if (exit_reason < kvm_vmx_max_exit_handlers 3274 && kvm_vmx_exit_handlers[exit_reason]){ 3275 int retval = kvm_vmx_exit_handlers[exit_reason](vcpu, kvm_run); 3276 printk(KERN_WARNING "returning from kvm_handle_exit, cause 3, retval = %i" 3277 ", exit_reason = %i\n" 3278 ,retval, exit_reason); 3279 // return kvm_vmx_exit_handlers[exit_reason](vcpu, kvm_run); 3280 return retval; 3281 } 3282 else { 3283 kvm_run->exit_reason = KVM_EXIT_UNKNOWN; 3284 kvm_run->hw.hardware_exit_reason = exit_reason; 3285 } 3286 printk(KERN_WARNING "returning from kvm_handle_exit\n 3287 return 0; 3288 } ... --> dmesg : [79116.175571] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175585] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175600] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175614] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175628] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175643] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175657] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175672] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175686] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175701] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175715] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175730] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175774] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175788] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175803] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175817] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175831] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175846] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175860] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175875] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175889] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175903] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175918] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [79116.175932] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 ... and so on until kvm gets killed ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-19 10:55 ` Andreas Tanz @ 2009-03-19 12:25 ` Avi Kivity 2009-03-19 15:10 ` Andreas Tanz 0 siblings, 1 reply; 23+ messages in thread From: Avi Kivity @ 2009-03-19 12:25 UTC (permalink / raw) To: andreas.tanz; +Cc: kvm Andreas Tanz wrote: > Hi! > > >>> The guest starts up showing the Bochs BIOS POST and stucks giving thousands of lines : >>> [15013.656923] returning from kvm_handle_exit, cause 3, retval = 1 >>> >>> >>> >> What was the value of exit_reason? >> >> > kernel/x86/vmx.c: > 3211 static int kvm_handle_exit(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) > 3212 { > ... > 3273 if (exit_reason < kvm_vmx_max_exit_handlers > 3274 && kvm_vmx_exit_handlers[exit_reason]){ > 3275 int retval = kvm_vmx_exit_handlers[exit_reason](vcpu, kvm_run); > 3276 printk(KERN_WARNING "returning from kvm_handle_exit, cause 3, retval = %i" > 3277 ", exit_reason = %i\n" > 3278 ,retval, exit_reason); > 3279 // return kvm_vmx_exit_handlers[exit_reason](vcpu, kvm_run); > 3280 return retval; > 3281 } > 3282 else { > 3283 kvm_run->exit_reason = KVM_EXIT_UNKNOWN; > 3284 kvm_run->hw.hardware_exit_reason = exit_reason; > 3285 } > 3286 printk(KERN_WARNING "returning from kvm_handle_exit\n > 3287 return 0; > 3288 } > ... > > --> dmesg : > [79116.175571] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 > That's an exception or nmi. Next step is to instrument handle_exception() and see what happens there. Please print out vect_info, intr_info, and kvm_rip_read(vcpu) (all as hex). The more you instrument, of course, the better. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-19 12:25 ` Avi Kivity @ 2009-03-19 15:10 ` Andreas Tanz 2009-03-19 15:19 ` Avi Kivity 0 siblings, 1 reply; 23+ messages in thread From: Andreas Tanz @ 2009-03-19 15:10 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm > > --> dmesg : > > [79116.175571] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 > > That's an exception or nmi. Next step is to instrument > handle_exception() and see what happens there. Please print out > vect_info, intr_info, and kvm_rip_read(vcpu) (all as hex). > > The more you instrument, of course, the better. > for testing i killed the kvm guest 0.4s after starting it - got this: thousands of lines : returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 mixed with single line (every ca. 40th-100th line) : returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 1 ... vmx.c : ... 3244 static int kvm_handle_exit(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) ... 3306 if (exit_reason < kvm_vmx_max_exit_handlers 3307 && kvm_vmx_exit_handlers[exit_reason]){ 3308 int retval = kvm_vmx_exit_handlers[exit_reason](vcpu, kvm_run); 3309 printk(KERN_WARNING "returning from kvm_handle_exit, cause 3, retval = %i" 3310 ", exit_reason = %i\n" 3311 ,retval, exit_reason); 3312 // return kvm_vmx_exit_handlers[exit_reason](vcpu, kvm_run); 3313 return retval; 3314 } 3315 else { ... i modded handle_exception : vmx.c: ... 2637 static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) 2638 { 2639 struct vcpu_vmx *vmx = to_vmx(vcpu); 2640 u32 intr_info, ex_no, error_code; 2641 unsigned long cr2, rip, dr6; 2642 u32 vect_info; 2643 enum emulation_result er; 2644 2645 vect_info = vmx->idt_vectoring_info; 2646 intr_info = vmcs_read32(VM_EXIT_INTR_INFO); 2647 2648 printk(KERN_ERR "vmx->handle_exception 00 : giving some infos\n"); 2649 printk(KERN_ERR "vmx->handle_exception 01 : vect_info: 0x%x\n",vect_info); 2650 printk(KERN_ERR "vmx->handle_exception 02 : intr_info: 0x%x, is_page_fault()==i%i\n",intr_info,is_page_fault(intr_info)); 2651 2652 if ((vect_info & VECTORING_INFO_VALID_MASK) && 2653 !is_page_fault(intr_info)) 2654 printk(KERN_ERR "%s: unexpected, vectoring info 0x%x " 2655 "intr info 0x%x\n", __func__, vect_info, intr_info); 2656 2657 printk(KERN_ERR "vmx->handle_exception 03 : irq_chip_in_kernel()==i%i\n",irqchip_in_kernel(vcpu->kvm)); 2658 printk(KERN_ERR "vmx->handle_exception 04 : is_external_interrupt()==i%i\n",is_external_interrupt(vect_info)); 2659 if (!irqchip_in_kernel(vcpu->kvm) && is_external_interrupt(vect_info)) { 2660 int irq = vect_info & VECTORING_INFO_VECTOR_MASK; 2661 printk(KERN_ERR "vmx->handle_exception 05 : irq: 0x%x\n",irq); 2662 set_bit(irq, vcpu->arch.irq_pending); 2663 set_bit(irq / BITS_PER_LONG, &vcpu->arch.irq_summary); 2664 } 2665 2666 if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR){ 2667 printk(KERN_ERR "vmx->handle_exception 06 : already handled by vmx_vcpu_run()\n"); 2668 return 1; /* already handled by vmx_vcpu_run() */ 2669 } 2670 2671 if (is_no_device(intr_info)) { 2672 printk(KERN_ERR "vmx->handle_exception 07 : is_no_device(intr_info)\n"); 2673 vmx_fpu_activate(vcpu); 2674 return 1; 2675 } 2676 2677 if (is_invalid_opcode(intr_info)) { 2678 printk(KERN_ERR "vmx->handle_exception 08 : is_invalid_opcode(intr_info)\n"); 2679 er = emulate_instruction(vcpu, kvm_run, 0, 0, EMULTYPE_TRAP_UD); 2680 if (er != EMULATE_DONE) { 2681 printk(KERN_ERR "vmx->handle_exception 09 : emulation not done. enqueueing exception\n"); 2682 kvm_queue_exception(vcpu, UD_VECTOR); 2683 } 2684 return 1; 2685 } 2686 2687 error_code = 0; 2688 rip = kvm_rip_read(vcpu); 2689 printk(KERN_ERR "vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x%x\n",rip); 2690 if (intr_info & INTR_INFO_DELIVER_CODE_MASK) 2691 error_code = vmcs_read32(VM_EXIT_INTR_ERROR_CODE); 2692 if (is_page_fault(intr_info)) { 2693 printk(KERN_ERR "vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x%x\n",is_page_fault(intr_info)); 2694 /* EPT won't cause page fault directly */ 2695 if (vm_need_ept()) 2696 BUG(); 2697 cr2 = vmcs_readl(EXIT_QUALIFICATION); 2698 printk(KERN_ERR "vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0x%x\n",cr2); 2699 KVMTRACE_3D(PAGE_FAULT, vcpu, error_code, (u32)cr2, 2700 (u32)((u64)cr2 >> 32), handler); 2701 if (vcpu->arch.interrupt.pending || vcpu->arch.exception.pending){ 2702 printk(KERN_ERR "vmx->handle_exception 0d : interrupt.pending or exception.pending\n"); 2703 kvm_mmu_unprotect_page_virt(vcpu, cr2); 2704 } 2705 int retval = kvm_mmu_page_fault(vcpu, cr2, error_code); 2706 printk(KERN_ERR "vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x%x\n",retval); 2707 //return kvm_mmu_page_fault(vcpu, cr2, error_code); 2708 return retval; 2709 } 2710 2711 printk(KERN_ERR "vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x%x\n",vcpu->arch.rmode.active); 2712 int debug_handle_rmode_exception = handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code); 2713 printk(KERN_ERR "vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x%x\n", debug_handle_rmode_exception 2714 if (vcpu->arch.rmode.active && debug_handle_rmode_exception) { 2715 if (vcpu->arch.halt_request) { 2716 printk(KERN_ERR "vmx->handle_exception 11 : vcpu->arch.halt_request: 0x%x, resetting to 0\n",vcpu->arch.halt_request); 2717 vcpu->arch.halt_request = 0; 2718 int retval = kvm_emulate_halt(vcpu); 2719 printk(KERN_ERR "vmx->handle_exception 12 : kvm_emulate_halt(vcpu) returned 0x%x\n",retval); 2720 // return kvm_emulate_halt(vcpu); 2721 return retval; 2722 } 2723 return 1; 2724 } 2725 2726 ex_no = intr_info & INTR_INFO_VECTOR_MASK; 2727 switch (ex_no) { 2728 case DB_VECTOR: 2729 dr6 = vmcs_readl(EXIT_QUALIFICATION); 2730 printk(KERN_ERR "vmx->handle_exception 13 : ex_no==DB_VECTOR==0x%x, vmcs_readl(EXIT_QUALIFICATION) returned 0x%x\n",ex_no,dr6); 2731 if (!(vcpu->guest_debug & 2732 (KVM_GUESTDBG_SINGLESTEP | KVM_GUESTDBG_USE_HW_BP))) { 2733 vcpu->arch.dr6 = dr6 | DR6_FIXED_1; 2734 printk(KERN_ERR "vmx->handle_exception 14 : enqueuing exception\n"); 2735 kvm_queue_exception(vcpu, DB_VECTOR); 2736 return 1; 2737 } 2738 kvm_run->debug.arch.dr6 = dr6 | DR6_FIXED_1; 2739 kvm_run->debug.arch.dr7 = vmcs_readl(GUEST_DR7); 2740 /* fall through */ 2741 case BP_VECTOR: 2742 if(ex_no == BP_VECTOR)printk(KERN_ERR "vmx->handle_exception 15 : ex_no==BP_VECTOR==0x%x\n",ex_no); 2743 kvm_run->exit_reason = KVM_EXIT_DEBUG; 2744 unsigned long debug_vmcs_readl = vmcs_readl(GUEST_CS_BASE); 2745 printk(KERN_ERR "vmx->handle_exception 16 : vmcs_readl(GUEST_CS_BASE) returned 0x%x\n",debug_vmcs_readl); 2746 kvm_run->debug.arch.pc = debug_vmcs_readl + rip; 2747 kvm_run->debug.arch.exception = ex_no; 2748 break; 2749 default: 2750 printk(KERN_ERR "vmx->handle_exception 17 : unknown ex_no: 0x%x, error_code: 0x%x\n",ex_no,error_code); 2751 kvm_run->exit_reason = KVM_EXIT_EXCEPTION; 2752 kvm_run->ex.exception = ex_no; 2753 kvm_run->ex.error_code = error_code; 2754 break; 2755 } 2756 printk(KERN_ERR "vmx->handle_exception 18 : reached end of handle_exception - returning i0\n"); 2757 return 0; 2758 } ... now, the guest crashes without kill -- ooops! did i break the code? i'm not a c-developer.... about 1000 years ago i touched c-code the last time.... :-I # dmesg: .... [93828.752082] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752104] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752127] vmx->handle_exception 00 : giving some infos [93828.752132] vmx->handle_exception 01 : vect_info: 0x0 [93828.752137] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.752142] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.752147] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.752152] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.752157] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.752163] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8724 [93828.752174] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.752180] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.752195] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752218] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752240] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752262] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752285] vmx->handle_exception 00 : giving some infos [93828.752290] vmx->handle_exception 01 : vect_info: 0x0 [93828.752295] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.752300] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.752305] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.752310] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.752315] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.752321] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8726 [93828.752332] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.752338] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.752353] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752376] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752398] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752420] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752443] vmx->handle_exception 00 : giving some infos [93828.752448] vmx->handle_exception 01 : vect_info: 0x0 [93828.752453] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.752458] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.752463] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.752468] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.752473] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.752478] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8728 [93828.752489] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.752495] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.752511] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752534] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752556] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752578] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752601] vmx->handle_exception 00 : giving some infos [93828.752606] vmx->handle_exception 01 : vect_info: 0x0 [93828.752610] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.752616] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.752621] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.752626] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.752631] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.752636] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb872a [93828.752647] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.752653] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.752668] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752691] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752713] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752735] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752758] vmx->handle_exception 00 : giving some infos [93828.752763] vmx->handle_exception 01 : vect_info: 0x0 [93828.752768] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.752773] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.752778] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.752783] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.752788] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.752794] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb872c [93828.752805] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.752811] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.752826] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752849] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752871] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752893] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752916] vmx->handle_exception 00 : giving some infos [93828.752921] vmx->handle_exception 01 : vect_info: 0x0 [93828.752926] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.752931] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.752936] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.752941] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.752946] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.752952] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb872e [93828.752962] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.752968] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.752984] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753015] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 1 [93828.753030] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753052] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753074] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753097] vmx->handle_exception 00 : giving some infos [93828.753102] vmx->handle_exception 01 : vect_info: 0x0 [93828.753107] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.753112] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.753117] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.753122] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.753128] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.753133] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8730 [93828.753144] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.753150] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.753166] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753189] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753211] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753233] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753255] vmx->handle_exception 00 : giving some infos [93828.753260] vmx->handle_exception 01 : vect_info: 0x0 [93828.753265] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.753270] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.753275] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.753280] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.753286] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.753291] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8732 [93828.753302] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.753308] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.753324] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753346] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753369] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753391] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753413] vmx->handle_exception 00 : giving some infos [93828.753418] vmx->handle_exception 01 : vect_info: 0x0 [93828.753423] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.753428] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.753433] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.753438] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.753444] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.753449] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8734 [93828.753460] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.753466] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.753481] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753504] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753526] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753548] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753571] vmx->handle_exception 00 : giving some infos [93828.753576] vmx->handle_exception 01 : vect_info: 0x0 [93828.753580] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.753586] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.753591] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.753596] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.753601] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.753606] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8736 [93828.753617] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.753623] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.753639] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753662] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753684] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753706] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753730] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753752] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753774] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753796] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753820] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753842] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753864] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753886] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753910] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753933] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753955] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753977] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754001] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754032] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754054] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754076] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754099] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754123] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754144] vmx->handle_exception 00 : giving some infos [93828.754149] vmx->handle_exception 01 : vect_info: 0x0 [93828.754154] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==i0 [93828.754159] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.754164] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.754169] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0xb8b3 [93828.754174] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [93828.754186] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [93828.754193] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.754207] vmx->handle_exception 00 : giving some infos [93828.754212] vmx->handle_exception 01 : vect_info: 0x0 [93828.754216] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==i0 [93828.754222] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.754227] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.754232] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0xb8b9 [93828.754237] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [93828.754247] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [93828.754254] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.754267] vmx->handle_exception 00 : giving some infos [93828.754272] vmx->handle_exception 01 : vect_info: 0x0 [93828.754277] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==i0 [93828.754282] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.754287] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.754292] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0xb8bf [93828.754297] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [93828.754306] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [93828.754313] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.754326] vmx->handle_exception 00 : giving some infos [93828.754331] vmx->handle_exception 01 : vect_info: 0x0 [93828.754336] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==i0 [93828.754341] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.754346] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.754351] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0xb8c4 [93828.754356] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [93828.754371] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [93828.754379] vmx->handle_exception 17 : unknown ex_no: 0xd, error_code: 0x0 [93828.754384] vmx->handle_exception 18 : reached end of handle_exception - returning i0 [93828.754389] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 0 ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-19 15:10 ` Andreas Tanz @ 2009-03-19 15:19 ` Avi Kivity 2009-03-19 15:34 ` Andreas Tanz 0 siblings, 1 reply; 23+ messages in thread From: Avi Kivity @ 2009-03-19 15:19 UTC (permalink / raw) To: andreas.tanz; +Cc: kvm Andreas Tanz wrote: >>> --> dmesg : >>> [79116.175571] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 >>> >> That's an exception or nmi. Next step is to instrument >> handle_exception() and see what happens there. Please print out >> vect_info, intr_info, and kvm_rip_read(vcpu) (all as hex). >> >> The more you instrument, of course, the better. >> >> > > for testing i killed the kvm guest 0.4s after starting it - got this: > > thousands of lines : > returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 > mixed with single line (every ca. 40th-100th line) : > returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 1 > ... > This is normal operation. 30 is IO_INSTRUCTION, the guest is probably reading its boot disk. 1 is EXTERNAL_INTERRUPT, normal host interrupts. So the guest hands a little later. Let it reach steady state and see where it hangs. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-19 15:19 ` Avi Kivity @ 2009-03-19 15:34 ` Andreas Tanz 2009-03-19 15:48 ` Avi Kivity 0 siblings, 1 reply; 23+ messages in thread From: Andreas Tanz @ 2009-03-19 15:34 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm i modded handle_exception as you said : vmx.c: ... 2637 static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) 2638 { 2639 struct vcpu_vmx *vmx = to_vmx(vcpu); 2640 u32 intr_info, ex_no, error_code; 2641 unsigned long cr2, rip, dr6; 2642 u32 vect_info; 2643 enum emulation_result er; 2644 2645 vect_info = vmx->idt_vectoring_info; 2646 intr_info = vmcs_read32(VM_EXIT_INTR_INFO); 2647 2648 printk(KERN_ERR "vmx->handle_exception 00 : giving some infos\n"); 2649 printk(KERN_ERR "vmx->handle_exception 01 : vect_info: 0x%x\n",vect_info); 2650 printk(KERN_ERR "vmx->handle_exception 02 : intr_info: 0x%x, is_page_fault()==i%i\n",intr_info,is_page_fault(intr_info)); 2651 2652 if ((vect_info & VECTORING_INFO_VALID_MASK) && 2653 !is_page_fault(intr_info)) 2654 printk(KERN_ERR "%s: unexpected, vectoring info 0x%x " 2655 "intr info 0x%x\n", __func__, vect_info, intr_info); 2656 2657 printk(KERN_ERR "vmx->handle_exception 03 : irq_chip_in_kernel()==i%i\n",irqchip_in_kernel(vcpu->kvm)); 2658 printk(KERN_ERR "vmx->handle_exception 04 : is_external_interrupt()==i%i\n",is_external_interrupt(vect_info)); 2659 if (!irqchip_in_kernel(vcpu->kvm) && is_external_interrupt(vect_info)) { 2660 int irq = vect_info & VECTORING_INFO_VECTOR_MASK; 2661 printk(KERN_ERR "vmx->handle_exception 05 : irq: 0x%x\n",irq); 2662 set_bit(irq, vcpu->arch.irq_pending); 2663 set_bit(irq / BITS_PER_LONG, &vcpu->arch.irq_summary); 2664 } 2665 2666 if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR){ 2667 printk(KERN_ERR "vmx->handle_exception 06 : already handled by vmx_vcpu_run()\n"); 2668 return 1; /* already handled by vmx_vcpu_run() */ 2669 } 2670 2671 if (is_no_device(intr_info)) { 2672 printk(KERN_ERR "vmx->handle_exception 07 : is_no_device(intr_info)\n"); 2673 vmx_fpu_activate(vcpu); 2674 return 1; 2675 } 2676 2677 if (is_invalid_opcode(intr_info)) { 2678 printk(KERN_ERR "vmx->handle_exception 08 : is_invalid_opcode(intr_info)\n"); 2679 er = emulate_instruction(vcpu, kvm_run, 0, 0, EMULTYPE_TRAP_UD); 2680 if (er != EMULATE_DONE) { 2681 printk(KERN_ERR "vmx->handle_exception 09 : emulation not done. enqueueing exception\n"); 2682 kvm_queue_exception(vcpu, UD_VECTOR); 2683 } 2684 return 1; 2685 } 2686 2687 error_code = 0; 2688 rip = kvm_rip_read(vcpu); 2689 printk(KERN_ERR "vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x%x\n",rip); 2690 if (intr_info & INTR_INFO_DELIVER_CODE_MASK) 2691 error_code = vmcs_read32(VM_EXIT_INTR_ERROR_CODE); 2692 if (is_page_fault(intr_info)) { 2693 printk(KERN_ERR "vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x%x\n",is_page_fault(intr_info)); 2694 /* EPT won't cause page fault directly */ 2695 if (vm_need_ept()) 2696 BUG(); 2697 cr2 = vmcs_readl(EXIT_QUALIFICATION); 2698 printk(KERN_ERR "vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0x%x\n",cr2); 2699 KVMTRACE_3D(PAGE_FAULT, vcpu, error_code, (u32)cr2, 2700 (u32)((u64)cr2 >> 32), handler); 2701 if (vcpu->arch.interrupt.pending || vcpu->arch.exception.pending){ 2702 printk(KERN_ERR "vmx->handle_exception 0d : interrupt.pending or exception.pending\n"); 2703 kvm_mmu_unprotect_page_virt(vcpu, cr2); 2704 } 2705 int retval = kvm_mmu_page_fault(vcpu, cr2, error_code); 2706 printk(KERN_ERR "vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x%x\n",retval); 2707 //return kvm_mmu_page_fault(vcpu, cr2, error_code); 2708 return retval; 2709 } 2710 2711 printk(KERN_ERR "vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x%x\n",vcpu->arch.rmode.active); 2712 int debug_handle_rmode_exception = handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code); 2713 printk(KERN_ERR "vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x%x\n", debug_handle_rmode_exception 2714 if (vcpu->arch.rmode.active && debug_handle_rmode_exception) { 2715 if (vcpu->arch.halt_request) { 2716 printk(KERN_ERR "vmx->handle_exception 11 : vcpu->arch.halt_request: 0x%x, resetting to 0\n",vcpu->arch.halt_request); 2717 vcpu->arch.halt_request = 0; 2718 int retval = kvm_emulate_halt(vcpu); 2719 printk(KERN_ERR "vmx->handle_exception 12 : kvm_emulate_halt(vcpu) returned 0x%x\n",retval); 2720 // return kvm_emulate_halt(vcpu); 2721 return retval; 2722 } 2723 return 1; 2724 } 2725 2726 ex_no = intr_info & INTR_INFO_VECTOR_MASK; 2727 switch (ex_no) { 2728 case DB_VECTOR: 2729 dr6 = vmcs_readl(EXIT_QUALIFICATION); 2730 printk(KERN_ERR "vmx->handle_exception 13 : ex_no==DB_VECTOR==0x%x, vmcs_readl(EXIT_QUALIFICATION) returned 0x%x\n",ex_no,dr6); 2731 if (!(vcpu->guest_debug & 2732 (KVM_GUESTDBG_SINGLESTEP | KVM_GUESTDBG_USE_HW_BP))) { 2733 vcpu->arch.dr6 = dr6 | DR6_FIXED_1; 2734 printk(KERN_ERR "vmx->handle_exception 14 : enqueuing exception\n"); 2735 kvm_queue_exception(vcpu, DB_VECTOR); 2736 return 1; 2737 } 2738 kvm_run->debug.arch.dr6 = dr6 | DR6_FIXED_1; 2739 kvm_run->debug.arch.dr7 = vmcs_readl(GUEST_DR7); 2740 /* fall through */ 2741 case BP_VECTOR: 2742 if(ex_no == BP_VECTOR)printk(KERN_ERR "vmx->handle_exception 15 : ex_no==BP_VECTOR==0x%x\n",ex_no); 2743 kvm_run->exit_reason = KVM_EXIT_DEBUG; 2744 unsigned long debug_vmcs_readl = vmcs_readl(GUEST_CS_BASE); 2745 printk(KERN_ERR "vmx->handle_exception 16 : vmcs_readl(GUEST_CS_BASE) returned 0x%x\n",debug_vmcs_readl); 2746 kvm_run->debug.arch.pc = debug_vmcs_readl + rip; 2747 kvm_run->debug.arch.exception = ex_no; 2748 break; 2749 default: 2750 printk(KERN_ERR "vmx->handle_exception 17 : unknown ex_no: 0x%x, error_code: 0x%x\n",ex_no,error_code); 2751 kvm_run->exit_reason = KVM_EXIT_EXCEPTION; 2752 kvm_run->ex.exception = ex_no; 2753 kvm_run->ex.error_code = error_code; 2754 break; 2755 } 2756 printk(KERN_ERR "vmx->handle_exception 18 : reached end of handle_exception - returning i0\n"); 2757 return 0; 2758 } ... now, the guest crashes without kill -- ooops! did i break the code? i'm not a c-developer.... about 1000 years ago i touched c-code the last time.... :-I # dmesg: .... [93828.752082] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752104] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752127] vmx->handle_exception 00 : giving some infos [93828.752132] vmx->handle_exception 01 : vect_info: 0x0 [93828.752137] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.752142] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.752147] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.752152] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.752157] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.752163] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8724 [93828.752174] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.752180] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.752195] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752218] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752240] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752262] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752285] vmx->handle_exception 00 : giving some infos [93828.752290] vmx->handle_exception 01 : vect_info: 0x0 [93828.752295] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.752300] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.752305] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.752310] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.752315] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.752321] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8726 [93828.752332] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.752338] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.752353] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752376] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752398] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752420] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752443] vmx->handle_exception 00 : giving some infos [93828.752448] vmx->handle_exception 01 : vect_info: 0x0 [93828.752453] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.752458] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.752463] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.752468] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.752473] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.752478] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8728 [93828.752489] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.752495] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.752511] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752534] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752556] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752578] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752601] vmx->handle_exception 00 : giving some infos [93828.752606] vmx->handle_exception 01 : vect_info: 0x0 [93828.752610] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.752616] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.752621] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.752626] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.752631] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.752636] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb872a [93828.752647] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.752653] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.752668] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752691] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752713] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752735] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752758] vmx->handle_exception 00 : giving some infos [93828.752763] vmx->handle_exception 01 : vect_info: 0x0 [93828.752768] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.752773] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.752778] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.752783] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.752788] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.752794] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb872c [93828.752805] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.752811] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.752826] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752849] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752871] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752893] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.752916] vmx->handle_exception 00 : giving some infos [93828.752921] vmx->handle_exception 01 : vect_info: 0x0 [93828.752926] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.752931] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.752936] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.752941] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.752946] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.752952] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb872e [93828.752962] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.752968] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.752984] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753015] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 1 [93828.753030] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753052] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753074] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753097] vmx->handle_exception 00 : giving some infos [93828.753102] vmx->handle_exception 01 : vect_info: 0x0 [93828.753107] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.753112] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.753117] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.753122] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.753128] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.753133] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8730 [93828.753144] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.753150] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.753166] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753189] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753211] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753233] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753255] vmx->handle_exception 00 : giving some infos [93828.753260] vmx->handle_exception 01 : vect_info: 0x0 [93828.753265] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.753270] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.753275] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.753280] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.753286] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.753291] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8732 [93828.753302] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.753308] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.753324] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753346] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753369] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753391] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753413] vmx->handle_exception 00 : giving some infos [93828.753418] vmx->handle_exception 01 : vect_info: 0x0 [93828.753423] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.753428] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.753433] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.753438] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.753444] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.753449] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8734 [93828.753460] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.753466] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.753481] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753504] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753526] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753548] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753571] vmx->handle_exception 00 : giving some infos [93828.753576] vmx->handle_exception 01 : vect_info: 0x0 [93828.753580] vmx->handle_exception 02 : intr_info: 0x80000b0e, is_page_fault()==i1 [93828.753586] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.753591] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.753596] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x7b8f [93828.753601] vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x1 [93828.753606] vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0xb8736 [93828.753617] vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x1 [93828.753623] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.753639] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753662] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753684] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753706] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753730] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753752] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753774] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753796] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753820] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753842] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753864] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753886] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753910] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753933] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753955] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.753977] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754001] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754032] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754054] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754076] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754099] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754123] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [93828.754144] vmx->handle_exception 00 : giving some infos [93828.754149] vmx->handle_exception 01 : vect_info: 0x0 [93828.754154] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==i0 [93828.754159] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.754164] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.754169] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0xb8b3 [93828.754174] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [93828.754186] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [93828.754193] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.754207] vmx->handle_exception 00 : giving some infos [93828.754212] vmx->handle_exception 01 : vect_info: 0x0 [93828.754216] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==i0 [93828.754222] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.754227] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.754232] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0xb8b9 [93828.754237] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [93828.754247] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [93828.754254] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.754267] vmx->handle_exception 00 : giving some infos [93828.754272] vmx->handle_exception 01 : vect_info: 0x0 [93828.754277] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==i0 [93828.754282] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.754287] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.754292] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0xb8bf [93828.754297] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [93828.754306] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [93828.754313] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [93828.754326] vmx->handle_exception 00 : giving some infos [93828.754331] vmx->handle_exception 01 : vect_info: 0x0 [93828.754336] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==i0 [93828.754341] vmx->handle_exception 03 : irq_chip_in_kernel()==i1 [93828.754346] vmx->handle_exception 04 : is_external_interrupt()==i0 [93828.754351] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0xb8c4 [93828.754356] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [93828.754371] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [93828.754379] vmx->handle_exception 17 : unknown ex_no: 0xd, error_code: 0x0 [93828.754384] vmx->handle_exception 18 : reached end of handle_exception - returning i0 [93828.754389] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 0 ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-19 15:34 ` Andreas Tanz @ 2009-03-19 15:48 ` Avi Kivity 2009-03-19 17:05 ` Andreas Tanz 0 siblings, 1 reply; 23+ messages in thread From: Avi Kivity @ 2009-03-19 15:48 UTC (permalink / raw) To: andreas.tanz; +Cc: kvm Andreas Tanz wrote: > i modded handle_exception as you said : > > 2711 printk(KERN_ERR "vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x%x\n",vcpu->arch.rmode.active); > 2712 int debug_handle_rmode_exception = handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code); > 2713 printk(KERN_ERR "vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x%x\n", debug_handle_rmode_exception > 2714 if (vcpu->arch.rmode.active && debug_handle_rmode_exception) { > This bit is broken. The original code: if (vcpu->arch.rmode.active && handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code)) { Only executes handle_rmode_exception() if rmode.active is true. Your code executes it unconditionally. You can write it as if (vcpu->arch.rmode.active && (retval = handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code))) { Please check for other cases as well. As it happens, the guest crashed immediately after entering protected mode (so rmode.active became false, triggering the bug). -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-19 15:48 ` Avi Kivity @ 2009-03-19 17:05 ` Andreas Tanz 2009-03-19 17:20 ` Avi Kivity 0 siblings, 1 reply; 23+ messages in thread From: Andreas Tanz @ 2009-03-19 17:05 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm Am 19.03.2009 schrieb Avi Kivity: > > This bit is broken. The original code: > > if (vcpu->arch.rmode.active && > handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, > error_code)) { > > Only executes handle_rmode_exception() if rmode.active is true. Your > code executes it unconditionally. > > You can write it as > > if (vcpu->arch.rmode.active && > (retval = handle_rmode_exception(vcpu, intr_info & > INTR_INFO_VECTOR_MASK, > error_code))) { > > > Please check for other cases as well. As it happens, the guest crashed > immediately after entering protected mode (so rmode.active became false, > triggering the bug). > ooooooops - stupid mistake :-I that was it... vmx.c now looks as this : .... 2637 static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) 2638 { 2639 struct vcpu_vmx *vmx = to_vmx(vcpu); 2640 u32 intr_info, ex_no, error_code; 2641 unsigned long cr2, rip, dr6; 2642 u32 vect_info; 2643 enum emulation_result er; 2644 2645 vect_info = vmx->idt_vectoring_info; 2646 intr_info = vmcs_read32(VM_EXIT_INTR_INFO); 2647 2648 printk(KERN_ERR "vmx->handle_exception 00 : giving some infos\n"); 2649 printk(KERN_ERR "vmx->handle_exception 01 : vect_info: 0x%x\n",vect_info); 2650 printk(KERN_ERR "vmx->handle_exception 02 : intr_info: 0x%x, is_page_fault()==%i\n",intr_info,is_page_fault(intr_info)); 2651 2652 if ((vect_info & VECTORING_INFO_VALID_MASK) && 2653 !is_page_fault(intr_info)) 2654 printk(KERN_ERR "%s: unexpected, vectoring info 0x%x " 2655 "intr info 0x%x\n", __func__, vect_info, intr_info); 2656 2657 printk(KERN_ERR "vmx->handle_exception 03 : irq_chip_in_kernel()==%i\n",irqchip_in_kernel(vcpu->kvm)); 2658 printk(KERN_ERR "vmx->handle_exception 04 : is_external_interrupt()==%i\n",is_external_interrupt(vect_info)); 2659 if (!irqchip_in_kernel(vcpu->kvm) && is_external_interrupt(vect_info)) { 2660 int irq = vect_info & VECTORING_INFO_VECTOR_MASK; 2661 printk(KERN_ERR "vmx->handle_exception 05 : irq: 0x%x\n",irq); 2662 set_bit(irq, vcpu->arch.irq_pending); 2663 set_bit(irq / BITS_PER_LONG, &vcpu->arch.irq_summary); 2664 } 2665 2666 if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR){ 2667 printk(KERN_ERR "vmx->handle_exception 06 : already handled by vmx_vcpu_run()\n"); 2668 return 1; /* already handled by vmx_vcpu_run() */ 2669 } 2670 2671 if (is_no_device(intr_info)) { 2672 printk(KERN_ERR "vmx->handle_exception 07 : is_no_device(intr_info)\n"); 2673 vmx_fpu_activate(vcpu); 2674 return 1; 2675 } 2676 2677 if (is_invalid_opcode(intr_info)) { 2678 printk(KERN_ERR "vmx->handle_exception 08 : is_invalid_opcode(intr_info)\n"); 2679 er = emulate_instruction(vcpu, kvm_run, 0, 0, EMULTYPE_TRAP_UD); 2680 if (er != EMULATE_DONE) { 2681 printk(KERN_ERR "vmx->handle_exception 09 : emulation not done. enqueueing exception\n"); 2682 kvm_queue_exception(vcpu, UD_VECTOR); 2683 } 2684 return 1; 2685 } 2686 2687 error_code = 0; 2688 rip = kvm_rip_read(vcpu); 2689 printk(KERN_ERR "vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x%lx\n",rip); 2690 if (intr_info & INTR_INFO_DELIVER_CODE_MASK) 2691 error_code = vmcs_read32(VM_EXIT_INTR_ERROR_CODE); 2692 if (is_page_fault(intr_info)) { 2693 printk(KERN_ERR "vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x%x\n",is_page_fault(intr_info)); 2694 /* EPT won't cause page fault directly */ 2695 if (vm_need_ept()) 2696 BUG(); 2697 cr2 = vmcs_readl(EXIT_QUALIFICATION); 2698 printk(KERN_ERR "vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0x%lx\n",cr2); 2699 KVMTRACE_3D(PAGE_FAULT, vcpu, error_code, (u32)cr2, 2700 (u32)((u64)cr2 >> 32), handler); 2701 if (vcpu->arch.interrupt.pending || vcpu->arch.exception.pending){ 2702 printk(KERN_ERR "vmx->handle_exception 0d : interrupt.pending or exception.pending\n"); 2703 kvm_mmu_unprotect_page_virt(vcpu, cr2); 2704 } 2705 int retval = kvm_mmu_page_fault(vcpu, cr2, error_code); 2706 printk(KERN_ERR "vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x%x\n",retval); 2707 //return kvm_mmu_page_fault(vcpu, cr2, error_code); 2708 return retval; 2709 } 2710 2711 printk(KERN_ERR "vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x%x\n",vcpu->arch.rmode.active); 2712 int debug_handle_rmode_exception = 0; 2713 if (vcpu->arch.rmode.active && (debug_handle_rmode_exception = handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code))) { 2714 printk(KERN_ERR "vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x%x\n",debug_handle_rmode_exception); 2715 if (vcpu->arch.halt_request) { 2716 printk(KERN_ERR "vmx->handle_exception 11 : vcpu->arch.halt_request: 0x%x, resetting to 0\n",vcpu->arch.halt_request); 2717 vcpu->arch.halt_request = 0; 2718 int retval = kvm_emulate_halt(vcpu); 2719 printk(KERN_ERR "vmx->handle_exception 12 : kvm_emulate_halt(vcpu) returned 0x%x\n",retval); 2720 // return kvm_emulate_halt(vcpu); 2721 return retval; 2722 } 2723 return 1; 2724 } 2725 2726 ex_no = intr_info & INTR_INFO_VECTOR_MASK; 2727 switch (ex_no) { 2728 case DB_VECTOR: 2729 dr6 = vmcs_readl(EXIT_QUALIFICATION); 2730 printk(KERN_ERR "vmx->handle_exception 13 : ex_no==DB_VECTOR==0x%x, vmcs_readl(EXIT_QUALIFICATION) returned 0x%lx\n",ex_no,dr6); 2731 if (!(vcpu->guest_debug & 2732 (KVM_GUESTDBG_SINGLESTEP | KVM_GUESTDBG_USE_HW_BP))) { 2733 vcpu->arch.dr6 = dr6 | DR6_FIXED_1; 2734 printk(KERN_ERR "vmx->handle_exception 14 : enqueuing exception\n"); 2735 kvm_queue_exception(vcpu, DB_VECTOR); 2736 return 1; 2737 } 2738 kvm_run->debug.arch.dr6 = dr6 | DR6_FIXED_1; 2739 kvm_run->debug.arch.dr7 = vmcs_readl(GUEST_DR7); 2740 /* fall through */ 2741 case BP_VECTOR: 2742 if(ex_no == BP_VECTOR)printk(KERN_ERR "vmx->handle_exception 15 : ex_no==BP_VECTOR==0x%x\n",ex_no); 2743 kvm_run->exit_reason = KVM_EXIT_DEBUG; 2744 unsigned long debug_vmcs_readl = vmcs_readl(GUEST_CS_BASE); 2745 printk(KERN_ERR "vmx->handle_exception 16 : vmcs_readl(GUEST_CS_BASE) returned 0x%lx\n",debug_vmcs_readl); 2746 kvm_run->debug.arch.pc = debug_vmcs_readl + rip; 2747 kvm_run->debug.arch.exception = ex_no; 2748 break; 2749 default: 2750 printk(KERN_ERR "vmx->handle_exception 17 : unknown ex_no: 0x%x, error_code: 0x%x\n",ex_no,error_code); 2751 kvm_run->exit_reason = KVM_EXIT_EXCEPTION; 2752 kvm_run->ex.exception = ex_no; 2753 kvm_run->ex.error_code = error_code; 2754 break; 2755 } 2756 printk(KERN_ERR "vmx->handle_exception 18 : reached end of handle_exception - returning 0\n"); 2757 return 0; 2758 } .... # dmesg : ..... [101324.097856] vmx->handle_exception 00 : giving some infos [101324.097861] vmx->handle_exception 01 : vect_info: 0x0 [101324.097865] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 [101324.097871] vmx->handle_exception 03 : irq_chip_in_kernel()==1 [101324.097876] vmx->handle_exception 04 : is_external_interrupt()==0 [101324.097881] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 [101324.097886] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [101324.097891] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [101324.097898] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [101324.097912] vmx->handle_exception 00 : giving some infos [101324.097917] vmx->handle_exception 01 : vect_info: 0x0 [101324.097922] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 [101324.097927] vmx->handle_exception 03 : irq_chip_in_kernel()==1 [101324.097932] vmx->handle_exception 04 : is_external_interrupt()==0 [101324.097937] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 [101324.097942] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [101324.097947] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [101324.097955] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [101324.097968] vmx->handle_exception 00 : giving some infos [101324.097973] vmx->handle_exception 01 : vect_info: 0x0 [101324.097978] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 [101324.097983] vmx->handle_exception 03 : irq_chip_in_kernel()==1 [101324.097988] vmx->handle_exception 04 : is_external_interrupt()==0 [101324.097993] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 [101324.097998] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [101324.098039] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [101324.098050] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 .... until kvm get's killed ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-19 17:05 ` Andreas Tanz @ 2009-03-19 17:20 ` Avi Kivity 2009-03-20 12:37 ` Andreas Tanz 2009-03-22 9:03 ` Avi Kivity 0 siblings, 2 replies; 23+ messages in thread From: Avi Kivity @ 2009-03-19 17:20 UTC (permalink / raw) To: andreas.tanz; +Cc: kvm Andreas Tanz wrote: > Am 19.03.2009 schrieb Avi Kivity: > >> This bit is broken. The original code: >> >> if (vcpu->arch.rmode.active && >> handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, >> error_code)) { >> >> Only executes handle_rmode_exception() if rmode.active is true. Your >> code executes it unconditionally. >> >> You can write it as >> >> if (vcpu->arch.rmode.active && >> (retval = handle_rmode_exception(vcpu, intr_info & >> INTR_INFO_VECTOR_MASK, >> error_code))) { >> >> >> Please check for other cases as well. As it happens, the guest crashed >> immediately after entering protected mode (so rmode.active became false, >> triggering the bug). >> >> > > ooooooops - stupid mistake :-I > that was it... > > vmx.c now looks as this : > .... > 2637 static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) > 2638 { > 2639 struct vcpu_vmx *vmx = to_vmx(vcpu); > 2640 u32 intr_info, ex_no, error_code; > 2641 unsigned long cr2, rip, dr6; > 2642 u32 vect_info; > 2643 enum emulation_result er; > 2644 > 2645 vect_info = vmx->idt_vectoring_info; > 2646 intr_info = vmcs_read32(VM_EXIT_INTR_INFO); > 2647 > 2648 printk(KERN_ERR "vmx->handle_exception 00 : giving some infos\n"); > 2649 printk(KERN_ERR "vmx->handle_exception 01 : vect_info: 0x%x\n",vect_info); > 2650 printk(KERN_ERR "vmx->handle_exception 02 : intr_info: 0x%x, is_page_fault()==%i\n",intr_info,is_page_fault(intr_info)); > 2651 > 2652 if ((vect_info & VECTORING_INFO_VALID_MASK) && > 2653 !is_page_fault(intr_info)) > 2654 printk(KERN_ERR "%s: unexpected, vectoring info 0x%x " > 2655 "intr info 0x%x\n", __func__, vect_info, intr_info); > 2656 > 2657 printk(KERN_ERR "vmx->handle_exception 03 : irq_chip_in_kernel()==%i\n",irqchip_in_kernel(vcpu->kvm)); > 2658 printk(KERN_ERR "vmx->handle_exception 04 : is_external_interrupt()==%i\n",is_external_interrupt(vect_info)); > 2659 if (!irqchip_in_kernel(vcpu->kvm) && is_external_interrupt(vect_info)) { > 2660 int irq = vect_info & VECTORING_INFO_VECTOR_MASK; > 2661 printk(KERN_ERR "vmx->handle_exception 05 : irq: 0x%x\n",irq); > 2662 set_bit(irq, vcpu->arch.irq_pending); > 2663 set_bit(irq / BITS_PER_LONG, &vcpu->arch.irq_summary); > 2664 } > 2665 > 2666 if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR){ > 2667 printk(KERN_ERR "vmx->handle_exception 06 : already handled by vmx_vcpu_run()\n"); > 2668 return 1; /* already handled by vmx_vcpu_run() */ > 2669 } > 2670 > 2671 if (is_no_device(intr_info)) { > 2672 printk(KERN_ERR "vmx->handle_exception 07 : is_no_device(intr_info)\n"); > 2673 vmx_fpu_activate(vcpu); > 2674 return 1; > 2675 } > 2676 > 2677 if (is_invalid_opcode(intr_info)) { > 2678 printk(KERN_ERR "vmx->handle_exception 08 : is_invalid_opcode(intr_info)\n"); > 2679 er = emulate_instruction(vcpu, kvm_run, 0, 0, EMULTYPE_TRAP_UD); > 2680 if (er != EMULATE_DONE) { > 2681 printk(KERN_ERR "vmx->handle_exception 09 : emulation not done. enqueueing exception\n"); > 2682 kvm_queue_exception(vcpu, UD_VECTOR); > 2683 } > 2684 return 1; > 2685 } > 2686 > 2687 error_code = 0; > 2688 rip = kvm_rip_read(vcpu); > 2689 printk(KERN_ERR "vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x%lx\n",rip); > 2690 if (intr_info & INTR_INFO_DELIVER_CODE_MASK) > 2691 error_code = vmcs_read32(VM_EXIT_INTR_ERROR_CODE); > 2692 if (is_page_fault(intr_info)) { > 2693 printk(KERN_ERR "vmx->handle_exception 0b : is_page_fault(intr_info) returned 0x%x\n",is_page_fault(intr_info)); > 2694 /* EPT won't cause page fault directly */ > 2695 if (vm_need_ept()) > 2696 BUG(); > 2697 cr2 = vmcs_readl(EXIT_QUALIFICATION); > 2698 printk(KERN_ERR "vmx->handle_exception 0c : vmcs_readl(EXIT_QUALIFICATION) returned 0x%lx\n",cr2); > 2699 KVMTRACE_3D(PAGE_FAULT, vcpu, error_code, (u32)cr2, > 2700 (u32)((u64)cr2 >> 32), handler); > 2701 if (vcpu->arch.interrupt.pending || vcpu->arch.exception.pending){ > 2702 printk(KERN_ERR "vmx->handle_exception 0d : interrupt.pending or exception.pending\n"); > 2703 kvm_mmu_unprotect_page_virt(vcpu, cr2); > 2704 } > 2705 int retval = kvm_mmu_page_fault(vcpu, cr2, error_code); > 2706 printk(KERN_ERR "vmx->handle_exception 0e : kvm_mmu_page_fault(vcpu, cr2, error_code) returned 0x%x\n",retval); > 2707 //return kvm_mmu_page_fault(vcpu, cr2, error_code); > 2708 return retval; > 2709 } > 2710 > 2711 printk(KERN_ERR "vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x%x\n",vcpu->arch.rmode.active); > 2712 int debug_handle_rmode_exception = 0; > 2713 if (vcpu->arch.rmode.active && (debug_handle_rmode_exception = handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code))) { > 2714 printk(KERN_ERR "vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x%x\n",debug_handle_rmode_exception); > 2715 if (vcpu->arch.halt_request) { > 2716 printk(KERN_ERR "vmx->handle_exception 11 : vcpu->arch.halt_request: 0x%x, resetting to 0\n",vcpu->arch.halt_request); > 2717 vcpu->arch.halt_request = 0; > 2718 int retval = kvm_emulate_halt(vcpu); > 2719 printk(KERN_ERR "vmx->handle_exception 12 : kvm_emulate_halt(vcpu) returned 0x%x\n",retval); > 2720 // return kvm_emulate_halt(vcpu); > 2721 return retval; > 2722 } > 2723 return 1; > 2724 } > 2725 > 2726 ex_no = intr_info & INTR_INFO_VECTOR_MASK; > 2727 switch (ex_no) { > 2728 case DB_VECTOR: > 2729 dr6 = vmcs_readl(EXIT_QUALIFICATION); > 2730 printk(KERN_ERR "vmx->handle_exception 13 : ex_no==DB_VECTOR==0x%x, vmcs_readl(EXIT_QUALIFICATION) returned 0x%lx\n",ex_no,dr6); > 2731 if (!(vcpu->guest_debug & > 2732 (KVM_GUESTDBG_SINGLESTEP | KVM_GUESTDBG_USE_HW_BP))) { > 2733 vcpu->arch.dr6 = dr6 | DR6_FIXED_1; > 2734 printk(KERN_ERR "vmx->handle_exception 14 : enqueuing exception\n"); > 2735 kvm_queue_exception(vcpu, DB_VECTOR); > 2736 return 1; > 2737 } > 2738 kvm_run->debug.arch.dr6 = dr6 | DR6_FIXED_1; > 2739 kvm_run->debug.arch.dr7 = vmcs_readl(GUEST_DR7); > 2740 /* fall through */ > 2741 case BP_VECTOR: > 2742 if(ex_no == BP_VECTOR)printk(KERN_ERR "vmx->handle_exception 15 : ex_no==BP_VECTOR==0x%x\n",ex_no); > 2743 kvm_run->exit_reason = KVM_EXIT_DEBUG; > 2744 unsigned long debug_vmcs_readl = vmcs_readl(GUEST_CS_BASE); > 2745 printk(KERN_ERR "vmx->handle_exception 16 : vmcs_readl(GUEST_CS_BASE) returned 0x%lx\n",debug_vmcs_readl); > 2746 kvm_run->debug.arch.pc = debug_vmcs_readl + rip; > 2747 kvm_run->debug.arch.exception = ex_no; > 2748 break; > 2749 default: > 2750 printk(KERN_ERR "vmx->handle_exception 17 : unknown ex_no: 0x%x, error_code: 0x%x\n",ex_no,error_code); > 2751 kvm_run->exit_reason = KVM_EXIT_EXCEPTION; > 2752 kvm_run->ex.exception = ex_no; > 2753 kvm_run->ex.error_code = error_code; > 2754 break; > 2755 } > 2756 printk(KERN_ERR "vmx->handle_exception 18 : reached end of handle_exception - returning 0\n"); > 2757 return 0; > 2758 } > > .... > > > # dmesg : > ..... > [101324.097856] vmx->handle_exception 00 : giving some infos > [101324.097861] vmx->handle_exception 01 : vect_info: 0x0 > [101324.097865] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 > [101324.097871] vmx->handle_exception 03 : irq_chip_in_kernel()==1 > [101324.097876] vmx->handle_exception 04 : is_external_interrupt()==0 > [101324.097881] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 > [101324.097886] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 > [101324.097891] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 > [101324.097898] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 > [101324.097912] vmx->handle_exception 00 : giving some infos > [101324.097917] vmx->handle_exception 01 : vect_info: 0x0 > [101324.097922] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 > [101324.097927] vmx->handle_exception 03 : irq_chip_in_kernel()==1 > [101324.097932] vmx->handle_exception 04 : is_external_interrupt()==0 > [101324.097937] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 > [101324.097942] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 > [101324.097947] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 > [101324.097955] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 > [101324.097968] vmx->handle_exception 00 : giving some infos > [101324.097973] vmx->handle_exception 01 : vect_info: 0x0 > [101324.097978] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 > [101324.097983] vmx->handle_exception 03 : irq_chip_in_kernel()==1 > [101324.097988] vmx->handle_exception 04 : is_external_interrupt()==0 > [101324.097993] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 > [101324.097998] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 > [101324.098039] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 > [101324.098050] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 > .... until kvm get's killed > The code in question is: 3152: fb sti 3153: 55 push %bp *** fault here *** 3154: 89 e5 mov %sp,%bp 3156: 8b 7e 2a mov 0x2a(%bp),%di 3159: 8b 46 28 mov 0x28(%bp),%ax 315c: 8b 4e 08 mov 0x8(%bp),%cx 315f: 81 ff 00 f8 cmp $0xf800,%di So it looks like we tried to inject the IDE interrupt (that's the first point where it is possible to inject interrupts), but via fails to inject the interrupt for some reason. I'll need to think how to debug this further. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-19 17:20 ` Avi Kivity @ 2009-03-20 12:37 ` Andreas Tanz 2009-03-22 8:53 ` Avi Kivity 2009-03-22 9:03 ` Avi Kivity 1 sibling, 1 reply; 23+ messages in thread From: Andreas Tanz @ 2009-03-20 12:37 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm Am 19.03.2009 schrieb Avi Kivity: > > [101324.097968] vmx->handle_exception 00 : giving some infos > > [101324.097973] vmx->handle_exception 01 : vect_info: 0x0 > > [101324.097978] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 > > [101324.097983] vmx->handle_exception 03 : irq_chip_in_kernel()==1 > > [101324.097988] vmx->handle_exception 04 : is_external_interrupt()==0 > > [101324.097993] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 > > [101324.097998] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 > > [101324.098039] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 > > [101324.098050] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 > > .... until kvm get's killed > > > > The code in question is: > > 3152: fb sti > 3153: 55 push %bp > > *** fault here *** > > 3154: 89 e5 mov %sp,%bp > 3156: 8b 7e 2a mov 0x2a(%bp),%di > 3159: 8b 46 28 mov 0x28(%bp),%ax > 315c: 8b 4e 08 mov 0x8(%bp),%cx > 315f: 81 ff 00 f8 cmp $0xf800,%di > > So it looks like we tried to inject the IDE interrupt (that's the first > point where it is possible to inject interrupts), but via fails to > inject the interrupt for some reason. > > I'll need to think how to debug this further. > Maybe the reason is elsewhere.... I'm unable to build any GCC 4.* (build crashes in stage 2 with a segfault when creating build/genoutput). I think there are some Nano specific x86-64-quirks gcc doesn't know about... Further it's impossible to build glibc in multilib mode (x86-64 together with x68-32). I'll post this in gentoo's bugzilla.... Everything else compiles fine (with precompiled gcc and glibc) ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-20 12:37 ` Andreas Tanz @ 2009-03-22 8:53 ` Avi Kivity 0 siblings, 0 replies; 23+ messages in thread From: Avi Kivity @ 2009-03-22 8:53 UTC (permalink / raw) To: andreas.tanz; +Cc: kvm Andreas Tanz wrote: > Maybe the reason is elsewhere.... > I'm unable to build any GCC 4.* (build crashes in stage 2 with a segfault when creating build/genoutput). > I think there are some Nano specific x86-64-quirks gcc doesn't know about... > Further it's impossible to build glibc in multilib mode (x86-64 together with x68-32). > I'll post this in gentoo's bugzilla.... > Everything else compiles fine (with precompiled gcc and glibc) > It's quite possible that Via deviates from the VT spec in some way. It's also possible that kvm assumes something that isn't guaranteed by the spec but just happens to work; I'd like to find out which. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-19 17:20 ` Avi Kivity 2009-03-20 12:37 ` Andreas Tanz @ 2009-03-22 9:03 ` Avi Kivity 2009-03-23 13:39 ` Andreas Tanz 1 sibling, 1 reply; 23+ messages in thread From: Avi Kivity @ 2009-03-22 9:03 UTC (permalink / raw) To: andreas.tanz; +Cc: kvm Avi Kivity wrote: > > The code in question is: > > 3152: fb sti 3153: > 55 push %bp > > *** fault here *** > > 3154: 89 e5 mov %sp,%bp > 3156: 8b 7e 2a mov 0x2a(%bp),%di > 3159: 8b 46 28 mov 0x28(%bp),%ax > 315c: 8b 4e 08 mov 0x8(%bp),%cx > 315f: 81 ff 00 f8 cmp $0xf800,%di > > So it looks like we tried to inject the IDE interrupt (that's the > first point where it is possible to inject interrupts), but via fails > to inject the interrupt for some reason. > > I'll need to think how to debug this further. > Please printk (as hex) vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) in vmx_vcpu_run(), just before the big asm statement. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-22 9:03 ` Avi Kivity @ 2009-03-23 13:39 ` Andreas Tanz 2009-03-23 14:08 ` Avi Kivity 0 siblings, 1 reply; 23+ messages in thread From: Andreas Tanz @ 2009-03-23 13:39 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm Am 22.03.2009 schrieb Avi Kivity: > Avi Kivity wrote: > > > > The code in question is: > > > > 3152: fb sti 3153: > > 55 push %bp > > > > *** fault here *** > > > > 3154: 89 e5 mov %sp,%bp > > 3156: 8b 7e 2a mov 0x2a(%bp),%di > > 3159: 8b 46 28 mov 0x28(%bp),%ax > > 315c: 8b 4e 08 mov 0x8(%bp),%cx > > 315f: 81 ff 00 f8 cmp $0xf800,%di > > > > So it looks like we tried to inject the IDE interrupt (that's the > > first point where it is possible to inject interrupts), but via fails > > to inject the interrupt for some reason. > > > > I'll need to think how to debug this further. > > > > Please printk (as hex) vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) in > vmx_vcpu_run(), just before the big asm statement. > > I don't know if this could influence something in kvm - now i got gcc-4.3.3 running.... gcc -v : Using built-in specs. Target: x86_64-pc-linux-gnu Configured with: /dev/shm/portage/sys-devel/gcc-4.3.3/work/gcc-4.3.3/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --enable-cld --disable-libgcj --enable-languages=c,c++,treelang,f ortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.3.3 p1.0, pie-10.1.5' Thread model: posix gcc version 4.3.3 (Gentoo 4.3.3 p1.0, pie-10.1.5) vmx.c: 3473 static void vmx_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) 3474 { ... 3500 3501 printk(KERN_INFO "vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x%x\n",vmcs_read32(VM_ENTRY_INTR_INFO_FIELD)); 3502 3503 asm( .... dmesg: Mar 23 14:27:35 [kernel] [ 5252.775955] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x8000040d Mar 23 14:27:35 [kernel] [ 5252.775967] vmx->handle_exception 00 : giving some infos Mar 23 14:27:35 [kernel] [ 5252.775972] vmx->handle_exception 01 : vect_info: 0x0 Mar 23 14:27:35 [kernel] [ 5252.775978] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 Mar 23 14:27:35 [kernel] [ 5252.775984] vmx->handle_exception 03 : irq_chip_in_kernel()==1 Mar 23 14:27:35 [kernel] [ 5252.775989] vmx->handle_exception 04 : is_external_interrupt()==0 Mar 23 14:27:35 [kernel] [ 5252.775995] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 Mar 23 14:27:35 [kernel] [ 5252.776000] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 Mar 23 14:27:35 [kernel] [ 5252.776015] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 Mar 23 14:27:35 [kernel] [ 5252.775769] vmx->handle_exception 01 : vect_info: 0x0 Mar 23 14:27:35 [kernel] [ 5252.775774] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 Mar 23 14:27:35 [kernel] [ 5252.775780] vmx->handle_exception 03 : irq_chip_in_kernel()==1 Mar 23 14:27:35 [kernel] [ 5252.775785] vmx->handle_exception 04 : is_external_interrupt()==0 Mar 23 14:27:35 [kernel] [ 5252.775791] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 Mar 23 14:27:35 [kernel] [ 5252.775797] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 Mar 23 14:27:35 [kernel] [ 5252.775803] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 Mar 23 14:27:35 [kernel] [ 5252.775819] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x8000040d Mar 23 14:27:35 [kernel] [ 5252.775832] vmx->handle_exception 00 : giving some infos Mar 23 14:27:35 [kernel] [ 5252.775837] vmx->handle_exception 01 : vect_info: 0x0 Mar 23 14:27:35 [kernel] [ 5252.775842] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 Mar 23 14:27:35 [kernel] [ 5252.775848] vmx->handle_exception 03 : irq_chip_in_kernel()==1 Mar 23 14:27:35 [kernel] [ 5252.775853] vmx->handle_exception 04 : is_external_interrupt()==0 Mar 23 14:27:35 [kernel] [ 5252.775859] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 Mar 23 14:27:35 [kernel] [ 5252.775865] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 Mar 23 14:27:35 [kernel] [ 5252.775871] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 Mar 23 14:27:35 [kernel] [ 5252.775887] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x8000040d Mar 23 14:27:35 [kernel] [ 5252.775910] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 Mar 23 14:27:35 [kernel] [ 5252.775916] vmx->handle_exception 03 : irq_chip_in_kernel()==1 Mar 23 14:27:35 [kernel] [ 5252.775921] vmx->handle_exception 04 : is_external_interrupt()==0 Mar 23 14:27:35 [kernel] [ 5252.775927] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 Mar 23 14:27:35 [kernel] [ 5252.775933] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 Mar 23 14:27:35 [kernel] [ 5252.775939] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 Mar 23 14:27:35 [kernel] [ 5252.775955] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x8000040d Mar 23 14:27:35 [kernel] [ 5252.775967] vmx->handle_exception 00 : giving some infos Mar 23 14:27:35 [kernel] [ 5252.775972] vmx->handle_exception 01 : vect_info: 0x0 Mar 23 14:27:35 [kernel] [ 5252.775978] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 Mar 23 14:27:35 [kernel] [ 5252.775984] vmx->handle_exception 03 : irq_chip_in_kernel()==1 Mar 23 14:27:35 [kernel] [ 5252.775989] vmx->handle_exception 04 : is_external_interrupt()==0 Mar 23 14:27:35 [kernel] [ 5252.775995] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 Mar 23 14:27:35 [kernel] [ 5252.776000] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 Mar 23 14:27:35 [kernel] [ 5252.776015] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 Mar 23 14:27:35 [kernel] [ 5252.775769] vmx->handle_exception 01 : vect_info: 0x0 Mar 23 14:27:35 [kernel] [ 5252.775774] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 Mar 23 14:27:35 [kernel] [ 5252.775780] vmx->handle_exception 03 : irq_chip_in_kernel()==1 Mar 23 14:27:35 [kernel] [ 5252.775785] vmx->handle_exception 04 : is_external_interrupt()==0 Mar 23 14:27:35 [kernel] [ 5252.775791] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 Mar 23 14:27:35 [kernel] [ 5252.775797] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 Mar 23 14:27:35 [kernel] [ 5252.775803] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 Mar 23 14:27:35 [kernel] [ 5252.775819] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x8000040d Mar 23 14:27:35 [kernel] [ 5252.775832] vmx->handle_exception 00 : giving some infos Mar 23 14:27:35 [kernel] [ 5252.775837] vmx->handle_exception 01 : vect_info: 0x0 Mar 23 14:27:35 [kernel] [ 5252.775842] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 Mar 23 14:27:35 [kernel] [ 5252.775848] vmx->handle_exception 03 : irq_chip_in_kernel()==1 Mar 23 14:27:35 [kernel] [ 5252.775853] vmx->handle_exception 04 : is_external_interrupt()==0 Mar 23 14:27:35 [kernel] [ 5252.775859] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 Mar 23 14:27:35 [kernel] [ 5252.775865] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 Mar 23 14:27:35 [kernel] [ 5252.775871] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 Mar 23 14:27:35 [kernel] [ 5252.775887] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x8000040d Mar 23 14:27:35 [kernel] [ 5252.775910] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 Mar 23 14:27:35 [kernel] [ 5252.775916] vmx->handle_exception 03 : irq_chip_in_kernel()==1 Mar 23 14:27:35 [kernel] [ 5252.775921] vmx->handle_exception 04 : is_external_interrupt()==0 Mar 23 14:27:35 [kernel] [ 5252.775927] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 Mar 23 14:27:35 [kernel] [ 5252.775933] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 Mar 23 14:27:35 [kernel] [ 5252.775939] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 Mar 23 14:27:35 [kernel] [ 5252.775955] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x8000040d Mar 23 14:27:35 [kernel] [ 5252.775967] vmx->handle_exception 00 : giving some infos Mar 23 14:27:35 [kernel] [ 5252.775972] vmx->handle_exception 01 : vect_info: 0x0 Mar 23 14:27:35 [kernel] [ 5252.775978] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 Mar 23 14:27:35 [kernel] [ 5252.775984] vmx->handle_exception 03 : irq_chip_in_kernel()==1 Mar 23 14:27:35 [kernel] [ 5252.775989] vmx->handle_exception 04 : is_external_interrupt()==0 Mar 23 14:27:35 [kernel] [ 5252.775995] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 Mar 23 14:27:35 [kernel] [ 5252.776000] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 Mar 23 14:27:35 [kernel] [ 5252.776015] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-23 13:39 ` Andreas Tanz @ 2009-03-23 14:08 ` Avi Kivity 2009-03-23 17:33 ` Andreas Tanz 0 siblings, 1 reply; 23+ messages in thread From: Avi Kivity @ 2009-03-23 14:08 UTC (permalink / raw) To: andreas.tanz; +Cc: kvm Andreas Tanz wrote: > Mar 23 14:27:35 [kernel] [ 5252.775939] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 > Mar 23 14:27:35 [kernel] [ 5252.775955] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x8000040d > Mar 23 14:27:35 [kernel] [ 5252.775967] vmx->handle_exception 00 : giving some infos > Mar 23 14:27:35 [kernel] [ 5252.775972] vmx->handle_exception 01 : vect_info: 0x0 > Mar 23 14:27:35 [kernel] [ 5252.775978] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 > Mar 23 14:27:35 [kernel] [ 5252.775984] vmx->handle_exception 03 : irq_chip_in_kernel()==1 > Mar 23 14:27:35 [kernel] [ 5252.775989] vmx->handle_exception 04 : is_external_interrupt()==0 > Mar 23 14:27:35 [kernel] [ 5252.775995] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 > Mar 23 14:27:35 [kernel] [ 5252.776000] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 > Mar 23 14:27:35 [kernel] [ 5252.776015] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 > > Okay, the data is already poisoned at this point. We need something from earlier in time. Try adding at the beginning of kvm_handle_exit() (after the three lines of declarations): { static int counter; if (kvm_rip_read(vcpu) == 0x3154 && counter++ >= 2) { kvm_run->exit_reason = KVM_EXIT_UNKNOWN; kvm_run->hw.hardware_exit_reason = exit_reason; return 0; } } This time, qemu should exit instead of looping. Please post the last few screenfulls of dmesg. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-23 14:08 ` Avi Kivity @ 2009-03-23 17:33 ` Andreas Tanz 2009-03-23 18:41 ` Avi Kivity 0 siblings, 1 reply; 23+ messages in thread From: Andreas Tanz @ 2009-03-23 17:33 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm Am 23.03.2009 schrieb Avi Kivity: > Okay, the data is already poisoned at this point. We need something > from earlier in time. > > Try adding at the beginning of kvm_handle_exit() (after the three lines > of declarations): > > { > static int counter; > > if (kvm_rip_read(vcpu) == 0x3154 && counter++ >= 2) { > kvm_run->exit_reason = KVM_EXIT_UNKNOWN; > kvm_run->hw.hardware_exit_reason = exit_reason; > return 0; > } > } > > This time, qemu should exit instead of looping. Please post the last > few screenfulls of dmesg. > vmx.c: ... 3244 static int kvm_handle_exit(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) 3245 { 3246 u32 exit_reason = vmcs_read32(VM_EXIT_REASON); 3247 struct vcpu_vmx *vmx = to_vmx(vcpu); 3248 u32 vectoring_info = vmx->idt_vectoring_info; 3249 3250 { 3251 static int counter; 3252 3253 if (kvm_rip_read(vcpu) == 0x3154 && counter++ >= 2) { 3254 kvm_run->exit_reason = KVM_EXIT_UNKNOWN; 3255 kvm_run->hw.hardware_exit_reason = exit_reason; 3256 return 0; 3257 } 3258 } 3259 ... invoked kvm with -daemonize i get this @ std[out,err]: unhandled vm exit: 0x0 vcpu_id 0 rax 0000000000000108 rbx 000000000000fd9c rcx 000000000000001e rdx 0000000000000000 rsi 00000000000e0000 rdi 000000000000fda2 rsp 000000000000fda8 rbp 000000000000fdb8 r8 0000000000000000 r9 0000000000000000 r10 0000000000000000 r11 0000000000000000 r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 0000000000000000 rip 0000000000003154 rflags 00033202 cs f000 (000f0000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0) ds 9fc0 (0009fc00/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0) es 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0) ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0) fs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0) gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0) tr 0000 (fffbd000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0) ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0) gdt fb947/30 idt 0/3ff cr0 10 cr2 0 cr3 0 cr4 0 cr8 0 efer 0 ./kvm.bash: line 69: 30497 Aborted dmesg : (notice - i enable kernel object debugging...) [ 3732.000000] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000026] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 1 [ 3732.000034] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000047] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000062] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000074] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000089] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000102] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000117] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000130] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000145] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000158] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000172] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000185] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000200] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000213] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000227] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000240] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000255] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000268] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000283] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000295] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000310] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000323] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000338] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000350] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000365] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000378] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000393] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000406] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000420] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000452] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 28 [ 3732.000465] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000477] vmx->handle_exception 00 : giving some infos [ 3732.000483] vmx->handle_exception 01 : vect_info: 0x0 [ 3732.000488] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 [ 3732.000494] vmx->handle_exception 03 : irq_chip_in_kernel()==1 [ 3732.000500] vmx->handle_exception 04 : is_external_interrupt()==0 [ 3732.000505] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0xb922 [ 3732.000511] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [ 3732.000527] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [ 3732.000535] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [ 3732.000543] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000557] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000573] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000587] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000602] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000615] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000631] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000831] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 1 [ 3732.000840] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000854] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000873] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000887] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000903] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000916] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000931] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000944] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000960] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.000973] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.000988] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001001] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001028] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001041] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001057] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001070] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001085] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001098] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001113] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001126] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001142] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001155] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001170] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001183] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001198] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001211] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001226] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001239] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001255] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001268] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001283] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001296] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001311] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001324] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001339] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001352] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001368] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001381] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001396] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001409] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001424] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001437] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001452] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001465] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001481] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001494] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001509] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001522] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001537] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001550] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001566] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001579] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001594] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001607] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001622] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001635] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001650] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001663] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001679] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001692] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001707] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001720] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001735] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001748] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001763] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001776] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001791] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001804] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001820] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001833] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001848] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001861] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001876] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001889] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001904] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001917] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001933] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001945] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001961] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.001974] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.001989] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.002012] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.018643] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.018659] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.018676] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.018689] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.018705] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.018718] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.018734] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.018746] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.018762] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.018775] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.018790] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.018815] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.018830] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.018843] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.018871] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.018884] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.018900] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.018913] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.018928] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.018941] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.018956] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.018969] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.018985] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.018998] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019025] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019038] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019053] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019067] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019082] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019095] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019111] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019124] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019140] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019153] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019179] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019192] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019210] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019223] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019239] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019252] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019267] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019280] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019296] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019309] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019324] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019337] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019355] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019368] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019386] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019399] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019417] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019430] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019448] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019461] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019477] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019490] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019505] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019518] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019533] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019546] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019562] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019575] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019590] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019603] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019619] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019631] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019649] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019663] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019681] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019694] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019709] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019723] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019738] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019751] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019767] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019779] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019795] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019808] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019823] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019836] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019851] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019864] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019880] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019893] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019916] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019929] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019947] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019960] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.019978] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.019991] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [ 3732.020020] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [ 3732.020033] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 7 [ 3732.020044] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x80000408 [ 3732.020056] vmx->handle_exception 00 : giving some infos [ 3732.020062] vmx->handle_exception 01 : vect_info: 0x0 [ 3732.020067] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 [ 3732.020073] vmx->handle_exception 03 : irq_chip_in_kernel()==1 [ 3732.020078] vmx->handle_exception 04 : is_external_interrupt()==0 [ 3732.020084] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 [ 3732.020089] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [ 3732.020096] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [ 3732.020104] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [ 3732.020115] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x8000040d [ 3748.716018] brlan: neighbor 8000.00:00:00:00:6f:4a lost on port 2(brlantap0) [ 3748.716029] brlan: topology change detected, propagating ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-23 17:33 ` Andreas Tanz @ 2009-03-23 18:41 ` Avi Kivity 2009-03-23 20:36 ` Avi Kivity 0 siblings, 1 reply; 23+ messages in thread From: Avi Kivity @ 2009-03-23 18:41 UTC (permalink / raw) To: andreas.tanz; +Cc: kvm Andreas Tanz wrote: > [ 3732.020033] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 7 > Here, vmx tells us that the guest is ready to accept interrupts (having executed the sti instruction) > [ 3732.020044] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x80000408 > ... noticing that, kvm injects a timer interrupt that was previously blocked ... > [ 3732.020056] vmx->handle_exception 00 : giving some infos > [ 3732.020062] vmx->handle_exception 01 : vect_info: 0x0 > [ 3732.020067] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 > ... and the Nano rewards us with a General Protection Fault instead of injecting the interrupt. Will talk to the specification and come up with further tests. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-23 18:41 ` Avi Kivity @ 2009-03-23 20:36 ` Avi Kivity 2009-03-25 9:45 ` Andreas Tanz 0 siblings, 1 reply; 23+ messages in thread From: Avi Kivity @ 2009-03-23 20:36 UTC (permalink / raw) To: andreas.tanz; +Cc: kvm Avi Kivity wrote: > > Will talk to the specification and come up with further tests. > Please printk() vmcs_readl(GUEST_RFLAGS) (where you printk kvm_rip_read()). -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: KVM on Via Nano (Isaiah) CPUs? <Virus checked> 2009-03-23 20:36 ` Avi Kivity @ 2009-03-25 9:45 ` Andreas Tanz 0 siblings, 0 replies; 23+ messages in thread From: Andreas Tanz @ 2009-03-25 9:45 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm > Avi Kivity wrote: > > > > Will talk to the specification and come up with further tests. > > > > Please printk() vmcs_readl(GUEST_RFLAGS) (where you printk kvm_rip_read()). > vmx.c: 2637 static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) 2638 { ... 2687 error_code = 0; 2688 rip = kvm_rip_read(vcpu); 2689 unsigned long debug_guest_rflags = vmcs_readl(GUEST_RFLAGS); 2690 printk(KERN_ERR "vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x%lx ; vmcs_readl(GUEST_RFLAGS) returned 0x%x 2691 if (intr_info & INTR_INFO_DELIVER_CODE_MASK) 2692 error_code = vmcs_read32(VM_EXIT_INTR_ERROR_CODE); ... # dmesg ... [63930.809295] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [63930.809313] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [63930.809326] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [63930.809344] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [63930.809358] returning from kvm_handle_exit, cause 3, retval = 0, exit_reason = 30 [63930.809376] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x0 [63930.809388] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 7 [63930.809399] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x80000408 [63930.809412] vmx->handle_exception 00 : giving some infos [63930.809417] vmx->handle_exception 01 : vect_info: 0x0 [63930.809423] vmx->handle_exception 02 : intr_info: 0x80000b0d, is_page_fault()==0 [63930.809429] vmx->handle_exception 03 : irq_chip_in_kernel()==1 [63930.809434] vmx->handle_exception 04 : is_external_interrupt()==0 [63930.809440] vmx->handle_exception 0a : kvm_rip_read(vcpu) returned 0x3154 ; vmcs_readl(GUEST_RFLAGS) returned 0x33202 <<<<<<<<<<<<<<<<<<< [63930.809447] vmx->handle_exception 0f : vcpu->arch.rmode.active: 0x1 [63930.809454] vmx->handle_exception 10 : handle_rmode_exception(vcpu, intr_info & INTR_INFO_VECTOR_MASK, error_code) returned 0x1 [63930.809462] returning from kvm_handle_exit, cause 3, retval = 1, exit_reason = 0 [63930.809474] vmx->vmx_vcpu_run() 00 : vmcs_read32(VM_ENTRY_INTR_INFO_FIELD) returned 0x8000040d ^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2009-05-12 7:04 UTC | newest] Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-02-16 13:45 KVM on Via Nano (Isaiah) CPUs? Craig Metz 2009-04-01 16:30 ` Avi Kivity 2009-05-08 19:16 ` Craig Metz 2009-05-09 9:32 ` Avi Kivity 2009-05-12 6:48 ` KVM on Via Nano (Isaiah) CPUs? <Virus checked> Andreas Tanz 2009-05-12 6:50 ` Avi Kivity [not found] <200903180902.29139.andreas.tanz@kvt.de> [not found] ` <200903181810.48603.andreas.tanz@kvt.de> [not found] ` <49C20DEE.9040302@redhat.com> 2009-03-19 10:55 ` Andreas Tanz 2009-03-19 12:25 ` Avi Kivity 2009-03-19 15:10 ` Andreas Tanz 2009-03-19 15:19 ` Avi Kivity 2009-03-19 15:34 ` Andreas Tanz 2009-03-19 15:48 ` Avi Kivity 2009-03-19 17:05 ` Andreas Tanz 2009-03-19 17:20 ` Avi Kivity 2009-03-20 12:37 ` Andreas Tanz 2009-03-22 8:53 ` Avi Kivity 2009-03-22 9:03 ` Avi Kivity 2009-03-23 13:39 ` Andreas Tanz 2009-03-23 14:08 ` Avi Kivity 2009-03-23 17:33 ` Andreas Tanz 2009-03-23 18:41 ` Avi Kivity 2009-03-23 20:36 ` Avi Kivity 2009-03-25 9:45 ` Andreas Tanz
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.