qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] NetBSD doesn't boot under KVM
@ 2017-03-21 16:14 Peter Maydell
  2017-03-21 16:24 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2017-03-21 16:14 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Paolo Bonzini

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] NetBSD doesn't boot under KVM
  2017-03-21 16:14 [Qemu-devel] NetBSD doesn't boot under KVM Peter Maydell
@ 2017-03-21 16:24 ` Paolo Bonzini
  2017-03-21 16:33   ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2017-03-21 16:24 UTC (permalink / raw)
  To: Peter Maydell, QEMU Developers



On 21/03/2017 17:14, Peter Maydell wrote:
> 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?

It sounds like a weird bug. :)  I'm downloading the image.

> (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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] NetBSD doesn't boot under KVM
  2017-03-21 16:24 ` Paolo Bonzini
@ 2017-03-21 16:33   ` Peter Maydell
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2017-03-21 16:33 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

On 21 March 2017 at 16:24, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 21/03/2017 17:14, Peter Maydell wrote:
>> Any ideas? Does this sound like a KVM bug, or a guest bug?
>
> It sounds like a weird bug. :)  I'm downloading the image.

Thanks. (the freenode/#netbsd IRC channel seemed to have
some helpful people in it, if you get down to deciding it's
a NetBSD bug.)

thanks
-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-21 16:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-21 16:14 [Qemu-devel] NetBSD doesn't boot under KVM Peter Maydell
2017-03-21 16:24 ` Paolo Bonzini
2017-03-21 16:33   ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).