[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] NetBSD doesn't boot under KVM
From: |
Peter Maydell |
Subject: |
[Qemu-devel] NetBSD doesn't boot under KVM |
Date: |
Tue, 21 Mar 2017 16:14:11 +0000 |
So if you try to boot NetBSD inside KVM:
qemu-img create -f qcow2 disk.qcow2 15G
wget http://cdn.netbsd.org/pub/NetBSD/NetBSD-7.1/images/NetBSD-7.1-amd64.iso
qemu-system-x86_64 -m 2048 -enable-kvm \
-drive if=virtio,file=disk.qcow2,format=qcow2 \
-netdev user,id=mynet0,hostfwd=tcp::7722-:22 \
-device e1000,netdev=mynet0 \
-cdrom NetBSD-7.1-amd64.iso
the guest kernel hangs during boot. This works fine for
running on real h/w (I assume), and also if you run in
TCG by dropping -enable-kvm.
It also works if you add -smp 2 -cpu kvm64,-sse2,-cx8
because the bit that causes problems seems to be
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/x86/x86/patch.c?rev=1.2.4.3&content-type=text/x-cvsweb-markup
where x86_patch() patches various bits of the guest kernel,
and turning off those cpuid features causes it to skip the
patching.
Any ideas? Does this sound like a KVM bug, or a guest bug?
(Tested on 4.4.0-31-generic #50-Ubuntu x86-64 host kernel
and QEMU emulator version 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.8).
Yes, I know that's really old...)
thanks
-- PMM
- [Qemu-devel] NetBSD doesn't boot under KVM,
Peter Maydell <=