Bug 202109 - [kvm][panic] KVM guest crash at boot while attaching keyboard
Summary: [kvm][panic] KVM guest crash at boot while attaching keyboard
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-05 18:27 UTC by Filipe Utzig
Modified: 2017-04-23 18:20 UTC (History)
2 users (show)

See Also:


Attachments
qemu command line (2.18 KB, text/plain)
2015-08-05 18:28 UTC, Filipe Utzig
no flags Details
Entire boot log (20.82 KB, text/plain)
2015-08-05 18:29 UTC, Filipe Utzig
no flags Details
libvirt VM configuration (4.44 KB, text/xml)
2015-08-05 18:29 UTC, Filipe Utzig
no flags Details
Software versions information (560 bytes, text/plain)
2015-08-05 18:30 UTC, Filipe Utzig
no flags Details
CPU info log (1.58 KB, text/plain)
2015-08-05 18:30 UTC, Filipe Utzig
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Filipe Utzig 2015-08-05 18:27:35 UTC
Trying to boot FreeBSD 10.1-RELEASE guest on a Linux KVM host, using libvirt and virt-manager, ends in a kernel panic while attaching keyboard.


atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
atkbd: the current kbd controller command byte 0061
atkbd: keyboard ID 0x41ab (2)
kbdc: RESET_KBD return code:00fa
kbdc: RESET_KBD status:00aa
kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address	= 0xfffffe002bf4d000
fault code		= supervisor read data, page not present
instruction pointer	= 0x20:0xffffffff80e0b591
stack pointer	        = 0x28:0xffffffff8195b6c0
frame pointer	        = 0x28:0xffffffff8195b6d0
code segment		= base rx0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags	= resume, IOPL = 0
current process		= 0 (swapper)
trap number		= 12
panic: page fault
cpuid = 0
KDB: stack backtrace:
#0 0xffffffff80963000 at kdb_backtrace+0x60
#1 0xffffffff80928125 at panic+0x155
#2 0xffffffff80d24f1f at trap_fatal+0x38f
#3 0xffffffff80d25238 at trap_pfault+0x308
#4 0xffffffff80d2489a at trap+0x47a
#5 0xffffffff80d0a782 at calltrap+0x8
#6 0xffffffff80e0d19b at x86emu_exec_one_byte+0x19eb
#7 0xffffffff80e0b748 at x86emu_exec+0x28
#8 0xffffffff80e0ac35 at x86bios_intr+0xc5
#9 0xffffffff80d375f5 at get_typematic+0x55
#10 0xffffffff80d36bad at atkbd_init+0x33d
#11 0xffffffff80d365df at atkbd_attach_unit+0x8f
#12 0xffffffff80d37e8b at atkbdattach+0x4b
#13 0xffffffff80959fc5 at device_attach+0x3a5
#14 0xffffffff8095b0cd at bus_generic_attach+0x2d
#15 0xffffffff80d39ffc at atkbdc_isa_attach+0x17c
#16 0xffffffff80959fc5 at device_attach+0x3a5
#17 0xffffffff8095b0cd at bus_generic_attach+0x2d
Uptime: 1s
Automatic reboot in 15 seconds - press a key on the console to abort



This issue doesn't happen in FreeBSD 9.3-RELEASE.

How-To-Repeat: Try to Install a FreeBSD 10.1-RELEASE guest on a Linux KVM host with virt-manager with default hardware configuration.

More information attached:
Comment 1 Filipe Utzig 2015-08-05 18:28:19 UTC
Created attachment 159578 [details]
qemu command line
Comment 2 Filipe Utzig 2015-08-05 18:29:00 UTC
Created attachment 159579 [details]
Entire boot log
Comment 3 Filipe Utzig 2015-08-05 18:29:44 UTC
Created attachment 159580 [details]
libvirt VM configuration
Comment 4 Filipe Utzig 2015-08-05 18:30:18 UTC
Created attachment 159581 [details]
Software versions information
Comment 5 Filipe Utzig 2015-08-05 18:30:34 UTC
Created attachment 159582 [details]
CPU info log
Comment 6 Vitaliy Filippov 2015-10-10 18:57:35 UTC
I'm also affected by this bug! I'm running Debian Unstable x86_64, QEMU is version 2.4.0 (Debian 1:2.4+dfsg-4).

I can say that the bug was NOT present in QEMU 2.1 (Debian 1:2.1+dfsg-11) with the exactly SAME FreeBSD 10.1 setup (I was testing it in May).

Does anyone know about some kind of workaround for this issue?
Comment 7 Vitaliy Filippov 2015-10-11 08:29:41 UTC
P.S: I've reproduced that bug simply by downloading FreeBSD 10.1 virtual machine image and trying to start it under qemu-kvm.

The same bug does not reproduce with FreeBSD 10.2 though.