[Libguestfs] Adventures in building libguestfs on non-x86 architectures for Debian

Richard W.M. Jones rjones at redhat.com
Sun Jul 6 20:51:23 UTC 2014


On Sun, Jul 06, 2014 at 09:43:59PM +0200, Hilko Bengen wrote:
> * Richard W.M. Jones:
> 
> >> Apparently, qemu-system-arm 2.0 as currently available through
> >> Debian/unstable doesn't want to tell us anything about available devices
> >> unless we specify a machine type. The patch below works around that
> >> issue, but I haven't been able to run qemu-system-arm with a supermin
> >> appliance on Debian's armhf porterbox so far: 100% CPU usage, no output
> >> from the kernel.
> >
> > ARM is always fun to debug, but 32 bit ARM should be working.  It
> > works for me anyway (using Fedora and qemu 1.x).
> 
> I just got around to revisiting the problem. Using
> qemu-system-arm_2.0.0+dfsg-6 from Debian/unstable, booting vexpress-a15
> doesn't seem to work, but vexpress-a9 does. I successfully built and did
> a "make quickcheck" on an armhf porterbox with the patch attached below.
> Is there any specific reason why -a15 was chosen that might make this a
> bad idea?

QEMU can emulate any of Cortex-A8, A9 and A15.

However we don't specify the -cpu explicitly, which we probably should
do.  I wonder if the default is different on Fedora and Debian for
some reason?

Of those only A15 is capable of virtualization, which for TCG only
matters if you want to do nested virt (and is irrelevant for
libguestfs).

In the hardware-assisted case (KVM), qemu-system-arm only emulates
A15, which is necessary because only A7 and A15 can do virtualization
and so you would only be running qemu-system-arm in KVM mode on A7 or
A15.  (In fact when I did get KVM working on my A7 system, I had to
patch qemu for exactly this reason).

So I think it's better to use A15, if it works.
Can you see if adding `-cpu cortex-a15' works instead?

> I alos noticed that there seems to be a plan to use -M virt at some
> point for 32bit arm. Can qemu generate the device tree internally yet?

-M virt is definitely preferable.

For Aarch64 we're using -M virt.

Thanks,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list