Hi,
i get an early kernel panic with some kernels:
The physical host runs 2.6.32-5-amd64 (debian stable/testing), and uses
qemu-kvm/0.12.5+dfsg-4 with libvirt 0.8.3-4.
The node is based on debian testing.
The host has two cores, the guest uses one.
The following tested kernel versions panic:
- 2.6.30 (linux-image-2.6.30-2-amd64/2.6.30-8squeeze1)
- 2.6.32 (linux-image-2.6.32-5-amd64/2.6.32-27)
- 2.6.36 (linux-image-2.6.36-trunk-amd64/2.6.36-1~experimental.1)
The debian stable kernel does *not* panic:
- 2.6.26 (linux-image-2.6.26-2-amd64/2.6.26-25)
Example log for 2.6.32-5-amd64 (experimental has similar backtrace); the
panic is caused by a div-by-zero in pvclock_tsc_khz:
[ 0.000000] kvm-clock: cpu 0, msr 0:14f1701, boot clock
PANIC: early exception 00 rip 10:ffffffff8102cd63 error 0 cr2 0
[ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.32-5-amd64 #1
[ 0.000000] Call Trace:
[ 0.000000] [<ffffffff814f319e>] ? early_idt_handler+0x5e/0x71
[ 0.000000] [<ffffffff8102cd63>] ? pvclock_tsc_khz+0x13/0x2a
[ 0.000000] [<ffffffff81503f17>] ? kvmclock_init+0x133/0x18c
[ 0.000000] [<ffffffff8150ccbe>] ? parse_crashkernel+0x46/0x23f
[ 0.000000] [<ffffffff814f75f8>] ? setup_arch+0x8f6/0x9cb
[ 0.000000] [<ffffffff811f6a9f>] ? extract_entropy+0x6a/0x125
[ 0.000000] [<ffffffff814f3140>] ? early_idt_handler+0x0/0x71
[ 0.000000] [<ffffffff814f39d0>] ? start_kernel+0xdb/0x3e8
[ 0.000000] [<ffffffff814f33b7>] ? x86_64_start_kernel+0xf9/0x106
[ 0.000000] RIP pvclock_tsc_khz+0x13/0x2a
(gdb) disassemble pvclock_tsc_khz
Dump of assembler code for function pvclock_tsc_khz:
0xffffffff8102cd50 <pvclock_tsc_khz+0>: sub $0x8,%rsp
0xffffffff8102cd54 <pvclock_tsc_khz+4>: mov 0x18(%rdi),%ecx
0xffffffff8102cd57 <pvclock_tsc_khz+7>: xor %edx,%edx
0xffffffff8102cd59 <pvclock_tsc_khz+9>: mov $0xf424000000000,%rax
0xffffffff8102cd63 <pvclock_tsc_khz+19>: div %rcx
0xffffffff8102cd66 <pvclock_tsc_khz+22>: movsbl 0x1c(%rdi),%ecx
0xffffffff8102cd6a <pvclock_tsc_khz+26>: test %cl,%cl
0xffffffff8102cd6c <pvclock_tsc_khz+28>: jns 0xffffffff8102cd75
<pvclock_tsc_khz+37>
0xffffffff8102cd6e <pvclock_tsc_khz+30>: neg %ecx
0xffffffff8102cd70 <pvclock_tsc_khz+32>: shl %cl,%rax
0xffffffff8102cd73 <pvclock_tsc_khz+35>: jmp 0xffffffff8102cd78
<pvclock_tsc_khz+40>
0xffffffff8102cd75 <pvclock_tsc_khz+37>: shr %cl,%rax
0xffffffff8102cd78 <pvclock_tsc_khz+40>: pop %rdx
0xffffffff8102cd79 <pvclock_tsc_khz+41>: retq
End of assembler dump.
Debian Bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603670
Regards,
Stefan
Loading Linux 2.6.32-5-amd64 ...
Loading initial ramdisk ...
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.32-5-amd64 (Debian 2.6.32-27) (maks@xxxxxxxxxx) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Sat Oct 30 14:18:21 UTC 2010
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-2.6.32-5-amd64 root=/dev/mapper/vg0-stefan ro single console=tty0 console=ttyS0,38400 earlyprintk=ttyS0
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
[ 0.000000] BIOS-e820: 000000000009f000 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 000000003fffb000 (usable)
[ 0.000000] BIOS-e820: 000000003fffb000 - 0000000040000000 (reserved)
[ 0.000000] BIOS-e820: 00000000fffbc000 - 0000000100000000 (reserved)
[ 0.000000] bootconsole [earlyser0] enabled
[ 0.000000] DMI 2.4 present.
[ 0.000000] last_pfn = 0x3fffb max_arch_pfn = 0x400000000
[ 0.000000] x86 PAT enabled: cpu 0, old 0x0, new 0x7010600070106
[ 0.000000] init_memory_mapping: 0000000000000000-000000003fffb000
[ 0.000000] RAMDISK: 2f87f000 - 3003c109
[ 0.000000] ACPI: RSDP 00000000000f8830 00014 (v00 BOCHS )
[ 0.000000] ACPI: RSDT 000000003fffde30 00034 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACP 000000003ffffe70 00074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001)
[ 0.000000] ACPI: DSDT 000000003fffdfd0 01E22 (v01 BXPC BXDSDT 00000001 INTL 20090123)
[ 0.000000] ACPI: FACS 000000003ffffe00 00040
[ 0.000000] ACPI: SSDT 000000003fffdf90 00037 (v01 BOCHS BXPCSSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: APIC 000000003fffdeb0 00072 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
[ 0.000000] ACPI: HPET 000000003fffde70 00038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001)
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at 0000000000000000-000000003fffb000
[ 0.000000] Bootmem setup node 0 0000000000000000-000000003fffb000
[ 0.000000] NODE_DATA [0000000000009000 - 0000000000010fff]
[ 0.000000] bootmap [0000000000011000 - 0000000000018fff] pages 8
[ 0.000000] (7 early reservations) ==> bootmem [0000000000 - 003fffb000]
[ 0.000000] #0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000]
[ 0.000000] #1 [0000006000 - 0000008000] TRAMPOLINE ==> [0000006000 - 0000008000]
[ 0.000000] #2 [0001000000 - 0001688414] TEXT DATA BSS ==> [0001000000 - 0001688414]
[ 0.000000] #3 [002f87f000 - 003003c109] RAMDISK ==> [002f87f000 - 003003c109]
[ 0.000000] #4 [000009f000 - 0000100000] BIOS reserved ==> [000009f000 - 0000100000]
[ 0.000000] #5 [0001689000 - 0001689071] BRK ==> [0001689000 - 0001689071]
[ 0.000000] #6 [0000008000 - 0000009000] PGTABLE ==> [0000008000 - 0000009000]
[ 0.000000] found SMP MP-table at [ffff8800000f8880] f8880
[ 0.000000] kvm-clock: cpu 0, msr 0:14f1701, boot clock
PANIC: early exception 00 rip 10:ffffffff8102cd63 error 0 cr2 0
[ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.32-5-amd64 #1
[ 0.000000] Call Trace:
[ 0.000000] [<ffffffff814f319e>] ? early_idt_handler+0x5e/0x71
[ 0.000000] [<ffffffff8102cd63>] ? pvclock_tsc_khz+0x13/0x2a
[ 0.000000] [<ffffffff81503f17>] ? kvmclock_init+0x133/0x18c
[ 0.000000] [<ffffffff8150ccbe>] ? parse_crashkernel+0x46/0x23f
[ 0.000000] [<ffffffff814f75f8>] ? setup_arch+0x8f6/0x9cb
[ 0.000000] [<ffffffff811f6a9f>] ? extract_entropy+0x6a/0x125
[ 0.000000] [<ffffffff814f3140>] ? early_idt_handler+0x0/0x71
[ 0.000000] [<ffffffff814f39d0>] ? start_kernel+0xdb/0x3e8
[ 0.000000] [<ffffffff814f33b7>] ? x86_64_start_kernel+0xf9/0x106
[ 0.000000] RIP pvclock_tsc_khz+0x13/0x2a