Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] mostly OT: qemu sparc64 emulation
Date: Mon, 30 Oct 2017 17:17:15
Message-Id: 20171030171703.GA29442@waltdnes.org
In Reply to: [gentoo-user] mostly OT: qemu sparc64 emulation by Ian Zimmerman
1 On Mon, Oct 30, 2017 at 08:43:50AM -0700, Ian Zimmerman wrote
2 > I built the gentoo qemu package [1] with support for a couple of
3 > non-x86 arches. Trying the sparc64 one, I installed FreeBSD-11.1
4 > into it. It kind of works, but:
5 >
6 > 1. It's very slow - I estimate about 5x-10x slower than an emulated
7 > x86_64, also running FreeBSD-11.1.
8
9 Think this through; when running an x86_64 VM on an x86_64 host,
10 you're usually doing *HARDWARE* "emulation"; i.e. the compiled code
11 machine language instructions are handled native by the physical cpu if
12 you lanch with "qemu-system-x86_64 -enable-kvm". Try software-only
13 emulation by launching with "qemu-x86_64" instead. Guess what... it's
14 also very slow. Since x86_64 does not have native sparc instructions,
15 it *MUST* use software emulation; hence the slow speed.
16
17 > 2. 1 processor on the host (a 4-way Phenom) is always at 100%, even
18 > when the guest is completely idle. This makes me think there is a
19 > virtual interrupt line that is always on, and this probably is the
20 > cause of #1. Again, this doesn't happen when the guest CPU is x86_64.
21 >
22 > 3. There is no emulated network device. This could be related to the
23 > ne2k_pci issue mentioned at [2]. I'd be willing to debug this, _if_ it
24 > were not for #1 and #2 ...
25 >
26 > anyone has a guess what is happening here?
27
28 I run an OS/2 VM with a bunch of parameters that may not apply to your
29 case. Are any of them relavant to you, e.g. "-parallel none"?
30
31 #!/bin/bash
32 cd /home/misc/qemu/os2
33 sudo /usr/bin/qemu-system-x86_64 -enable-kvm -runas waltdnes \
34 -cpu pentium3 -monitor vc \
35 -drive file=os2c.img,format=raw \
36 -drive file=os2d.img,format=raw \
37 -netdev user,id=mynetwork,tftp=/dev/shm/xfer \
38 -device pcnet,netdev=mynetwork \
39 -rtc base=localtime,clock=host \
40 -m size=64 -name "OS/2 VM" -boot order=c \
41 -vga std -parallel none \
42 ${@}
43
44 --
45 Walter Dnes <waltdnes@××××××××.org>
46 I don't run "desktop environments"; I run useful applications