Bugs item #1769884, was opened at 2007-08-08 11:43 Message generated for change (Settings changed) made by jessorensen You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1769884&group_id=180599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: yunfeng (yunfeng) Assigned to: Nobody/Anonymous (nobody) Summary: Fail to boot linux 2.6.22 kernel with nmi watchdog Initial Comment: I cannot boot linux guest with 2.6.22 kernel. The guest crashed while booting kernel. The screen snapshot is attached. Some error messages in host dmesg: >kvm: 9511: cpu0 unhandled wrmsr: 0xc1 >kvm: 9612: cpu0 unhandled wrmsr: 0xc1 >kvm: 9654: cpu0 unhandled wrmsr: 0xc1 But if i add nolapic to the guest kernel, the guest could be booted up without any problem. ---------------------------------------------------------------------- >Comment By: Jes Sorensen (jessorensen) Date: 2010-06-11 14:32 Message: Pulled down 2.6.22 and made sure to compile it with CONFIG_OPROFILE=y, booted it as a guest under a recent version of KVM+QEMU-KVM. Boots without problems, it no longer explodes after the NMI test. Closing this bug ---------------------------------------------------------------------- Comment By: Avi Kivity (avik) Date: 2008-01-13 18:56 Message: Logged In: YES user_id=539971 Originator: NO 2.6.22 is still broken as a guest, so reopening. ---------------------------------------------------------------------- Comment By: Carlo Marcelo Arenas Belon (carenas) Date: 2008-01-13 09:56 Message: Logged In: YES user_id=36771 Originator: NO this was fixed in the guest by newer versions of the linux kernel as shown by : http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=57c22f49e4c7d27a03e109a317c30b12f1bae0b2 but will still affect old guest kernels (<2.6.22.5) which don't include the fix as shown by the following dmesg obtained from kvm-59 loaded kvm module (kvm-59) kvm: 23630: cpu0 unhandled wrmsr: 0xc1 data 0 ---------------------------------------------------------------------- Comment By: Carlo Marcelo Arenas Belon (carenas) Date: 2007-09-27 12:41 Message: Logged In: YES user_id=36771 Originator: NO correction: -no-kvm or qemu (including qemu+kqemu) are able to boot the guest (after initializing the CPU) even if the NMI interrupt watchdog is not working as shown by the following message: oprofile: using NMI interrupt. Testing NMI watchdog ... CPU#0: NMI appears to be stuck (0->0)! removing oprofile support from the guest kernel doesn't make a difference though. the problematic code snippet in the guest kernel that triggers the GPF is : evntsel_msr = MSR_P6_EVNTSEL0; wrmsrl(perfctr_msr, 0UL); evntsel = P6_EVNTSEL_INT | P6_EVNTSEL_OS | P6_EVNTSEL_USR | P6_NMI_EVENT; /* setup the timer */ wrmsr(evntsel_msr, evntsel, 0); because of an unhandled wrmsr as shown by : kvm: 12437: cpu0 unhandled wrmsr: 0xc1 inject_general_protection: rip 0xc010d62b ---------------------------------------------------------------------- Comment By: Carlo Marcelo Arenas Belon (carenas) Date: 2007-09-27 11:20 Message: Logged In: YES user_id=36771 Originator: NO using kvm-44 or kvm-44 + all patches I could get from both git heads still crashes for me regardless of the use of -no-kvm or -no-kvm-irqchip when running : Host: CPU: Intel(R) Core(TM)2 CPU 6320 OS: Gentoo Linux 2007.0/amd64 Kernel: 2.6.22-gentoo-r5 (kvm provided modules) Guest: OS: Gentoo Linux 2007.0/x86 (i486-pc-linux-gnu) Kernel: 2.6.22-gentoo-r5 (CONFIG_MPENTIUMIII=y) booting the guest with nolapic or nmi_watchdog=0 is the only known workaround to boot, but will result in the reported "hangcheck" messages unless the guest kernel is recompiled without that option. the kernel panic resulting is not dumped to serial console but is visible in the SDL console with the following output (hand copied from the screen) Process swapper (pid: 1, ti=c1146000 task=c1157a50 task.ti=c1146000) Stack: 0000012c 00050014 c1147e90 c010d104 00000246 00000000 c05a5168 c010ff52 00000000 c010f830 c056d7df 00000000 c1147e90 c1147e90 00000000 c056ddbd 00000000 00000000 00000001 00000000 00000000 00000000 00000000 00000000 Call Trace: [<c010d104>] lapic_watchdog_init+0xb0/0xe4 [<c010ff52>] setup_apic_nmi_watchdog+0x46/0x73 [<c010f830>] setup_local_APIC+0x27f/0x28f [<c056d7df>] verify_local_APIC+0x89/0x12e [<c056ddbd>] APIC_init_uniprocessor+0xb4/0xe3 [<c056ba7d>] native_smp_prepare_cpus+0x2af/0xa2f [<c0114a32>] tas_rq_lock+0x31/0x58 [<c055f642>] kernel_init+0x0/0x2a7 [<c055f694>] kernel_init+0x52/0x2a7 [<c0102f4a>] ret_from_fork+0x6/0x1c [<c055f642>] kernel_init+0x0/0x2a7 [<c055f642>] kernel_init+0x0/0x2a7 [<c0103c1f>] kernel_thread_helper+0x7/0x10 Code: 00 01 c0 c7 06 00 00 00 00 5b 5e 5f c3 57 89 c7 56 31 c0 53 bb c1 00 00 00 64 8b 15 04 51 5a c0 be 0c 50 5a c0 89 d9 01 d6 31 d2 <0f> 30 66 bb 86 01 b8 79 00 13 00 89 d9 31 d2 0f 30 89 f8 e8 85 EIP: [<c010d62b>] setup_p6_watchdog+0x1e/0x82 SS:ESP 0068:c1147e28 Kernel panic - not syncing: Attempted to kill init! ---------------------------------------------------------------------- Comment By: yunfeng (yunfeng) Date: 2007-09-27 05:29 Message: Logged In: YES user_id=1283543 Originator: YES Retested it. It has been fixed already. ---------------------------------------------------------------------- Comment By: Carlo Marcelo Arenas Belon (carenas) Date: 2007-09-25 09:27 Message: Logged In: YES user_id=36771 Originator: NO On either case (nolapic or nmi_watchdog=0) the guest will be showing missing healtchecks as shown by : Hangcheck: hangcheck value past margin! if the guest kernel was compiled with CONFIG_HANGCHECK_TIMER=y (the default for x86 and amd64) ---------------------------------------------------------------------- Comment By: yunfeng (yunfeng) Date: 2007-08-08 16:50 Message: Logged In: YES user_id=1283543 Originator: YES Yes,'nmi_watchdog=0' also helps. ---------------------------------------------------------------------- Comment By: Avi Kivity (avik) Date: 2007-08-08 16:21 Message: Logged In: YES user_id=539971 Originator: NO Does this happen with guest kernel parameter 'nmi_watchdog=0'? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1769884&group_id=180599 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html