Description of problem: NetBSD v5.1.2 executed without problem under F16, but won't start under F17. The guest reports: "panic: cnopen: no console device" Version-Release number of selected component (if applicable): On the F17 host: uname -a Linux xxxxxx 3.4.0-1.fc17.x86_64 #1 SMP Sun Jun 3 06:35:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux (It failed the same way right after upgrading to F17 when I was still running 3.3.6-3.fc16.x86_64, before I got grub fixed.) rpm -qa | grep qemu qemu-kvm-tools-1.0-17.fc17.x86_64 qemu-kvm-1.0-17.fc17.x86_64 ipxe-roms-qemu-20120328-1.gitaac9718.fc17.noarch qemu-common-1.0-17.fc17.x86_64 qemu-img-1.0-17.fc17.x86_64 qemu-system-x86-1.0-17.fc17.x86_64 How reproducible: Always Steps to Reproduce: 1. Download the iso here or from another mirror: http://mirror.planetunix.net/pub/NetBSD/NetBSD-5.1.2/iso/amd64cd-5.1.2.iso 2. Execute either command: qemu-kvm -boot c -cdrom amd64cd-5.1.2.iso & qemu-system-x86_64 -boot c -cdrom amd64cd-5.1.2.iso & 3. When the NetBSD guest presents the menu (white text in the SDL window), press '1' to install or wait for the timeout. Actual results: The guest scrolls its the second level boot (green text) until it fails: warning: no /dev/console panic: cnopen: no console device fatal breakpoint trap in supervisor mode trap type 1 code 0 rip ffffffff80527525 cs 8 rflags 246 cr2 7f7ffde3e188 cpl 0 rsp ffff80000a7f57f0 Stopped in pid 2.1 (sh) at 0xffffffff80527525: leave db[0}> Expected results: Normal execution. Additional info: It fails the same way with the virtual disk I installed it on under F16. I also tried -no-kvm-irqchip, -no-kvm-pit and -no-kvm in turn but they had no effect.
confirm this bug For other BSDs. I was able to boot OpenBSD/bitrig and FreeBSD. This could be a bug of NetBSD though.
Strange. Upstream works. Maybe an ACPI regression.
Confirmed this behaviour in Fedora 17 (x86_64) with kvm-qemu; same machine with VirtualBox installs and boots netbsd 6.0RC2 fine. packages: augeas-libs.x86_64 0:0.10.0-3.fc17 gnutls-utils.x86_64 0:2.12.17-1.fc17 libvirt-client.x86_64 0:0.9.11.5-3.fc17 libvirt-python.x86_64 0:0.9.11.5-3.fc17 libwsman1.x86_64 0:2.2.7-5.fc17 netcf-libs.x86_64 0:0.1.9-2.fc17 spice-gtk.x86_64 0:0.12-5.fc17 spice-gtk-python.x86_64 0:0.12-5.fc17 virt-manager-common.noarch 0:0.9.4-1.fc17 vte.x86_64 0:0.28.2-6.fc17 xen-libs.x86_64 0:4.1.3-4.fc17 xen-licenses.x86_64 0:4.1.3-4.fc17 VirtualBox-4.2.x86_64 0:4.2.0_80737_fedora17-1 python-virtinst.noarch 0:0.600.3-1.fc17 qemu-kvm.x86_64 2:1.0.1-1.fc17 virt-manager.noarch 0:0.9.4-1.fc17 virt-viewer.x86_64 0:0.5.3-1.fc17 augeas-libs.x86_64 0:0.10.0-3.fc17 gnutls-utils.x86_64 0:2.12.17-1.fc17 libvirt-client.x86_64 0:0.9.11.5-3.fc17 libvirt-python.x86_64 0:0.9.11.5-3.fc17 libwsman1.x86_64 0:2.2.7-5.fc17 netcf-libs.x86_64 0:0.1.9-2.fc17 spice-gtk.x86_64 0:0.12-5.fc17 spice-gtk-python.x86_64 0:0.12-5.fc17 virt-manager-common.noarch 0:0.9.4-1.fc17 vte.x86_64 0:0.28.2-6.fc17 xen-libs.x86_64 0:4.1.3-4.fc17 xen-licenses.x86_64 0:4.1.3-4.fc17 --- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
It fails similarly with NetBSD 6.0, though the error text is different. http://mirror.planetunix.net/pub/NetBSD/iso/6.0/NetBSD-6.0-amd64.iso Guest error text: ioapic0 at mainbus0 apid 1 acpi0 at mainbus0: Intel ACPICA 20110623 panic: pci_make_tag: bad request fatal breakpoint trap in supervisor mode trap type 1 code 0 rip ffffffff80252d0d cs 8 rflags 246 cr2 0 cpl 8 rsp ffffffff80fcab10 Stopped in pid 0.1 (system) at netbsd:breakpoint+0x5: leave db{0}> Host: uname -a Linux xxxxxx 3.6.1-1.fc17.x86_64 #1 SMP Wed Oct 10 12:13:05 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux rpm -qa | grep qemu qemu-kvm-1.0.1-2.fc17.x86_64 qemu-img-1.0.1-2.fc17.x86_64 qemu-common-1.0.1-2.fc17.x86_64 ipxe-roms-qemu-20120328-1.gitaac9718.fc17.noarch qemu-system-x86-1.0.1-2.fc17.x86_64 qemu-kvm-tools-1.0.1-2.fc17.x86_64
Can you reproduce this with F18? It looks to be fixed there. [ FWIW, I was successfully working around it by "boot -d" to drop into the kernel debugger, and then "w pci_mode 1" to force it to use PCI mode1 config access instead of attempting to probe it. My guess is something in the KVM emulation of PCIbios got fixed, and the reason most other OS didn't see this is they poke PCIbios during their bootloader and pass it into the kernel, whereas NetBSD doesn't look at what mode the BIOS says to use at all. ]
Chuck Silvers from the NetBSD world emailed me saying, "In fedora 17, netbsd autodetects the PCI configuration mode as "mode 2", which is almost certainly wrong since mode 2 supposedly isn't used by anything these days. In fedora 18 it's detected as mode 1 and everything works." So I upgraded to Fedora 18, and yes indeed! It works. Now I can continue my exploration of NetBSD from within Fedora/QEMU/KVM.
I spent the afternoon learning how PCI works on qemu/seabios... Turns out this is: master@qemu:.% git show cdde6ffc (kyle@redacted:~/src/qemu) commit cdde6ffc27517bdf069734fbc5693ce2b14edc75 Author: Avi Kivity <avi> Date: Wed Jan 4 16:28:42 2012 +0200 pci: fix corrupted pci conf index register by unaligned write Commit d0ed8076cbdc261 converted the PCI config access to the memory API, but also inadvertantly changed it to accept unaligned writes, and corrupt the index register in the process. This causes a regression booting NetBSD. Fix by ignoring unaligned or non-dword writes. https://bugs.launchpad.net/qemu/+bug/897771 Reported-by: Andreas Gustafsson <gson> Signed-off-by: Avi Kivity <avi> Signed-off-by: Michael S. Tsirkin <mst> I don't really see a reason why we cannot fix it in F-17 as well, so I'm going to reopen it.
qemu-1.0.1-4.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/qemu-1.0.1-4.fc17
Package qemu-1.0.1-4.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing qemu-1.0.1-4.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-1796/qemu-1.0.1-4.fc17 then log in and leave karma (feedback).
qemu-1.0.1-4.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.