]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Do setup_fdt() later, get powerpc to boot again
authorMichael Ellerman <michael@ellerman.id.au>
Fri, 5 Oct 2012 01:15:19 +0000 (11:15 +1000)
committerPekka Enberg <penberg@kernel.org>
Fri, 5 Oct 2012 06:29:29 +0000 (09:29 +0300)
commitda22ea8144344b57c88ead0075409746ba93e5a0
tree95b72d772c3ef24044ff697aad10dcc648dd3b9f
parentea9b027e890785a5ddcc15c3b1d25e383c0f31e8
kvm tools: Do setup_fdt() later, get powerpc to boot again

In commit e3d3ced "kernel load/firmware cleanup", the call to
kvm__arch_setup_firmware() was moved. Previously more or less at the end
of the init sequence, but that commit moved it into kvm__init() which
is a core_init() call and so runs quite early.

This broke booting powerpc guests, as setup_fdt() needs to be called
later in the setup sequence. In particular it looks at kvm->nrcpus,
which is uninitialised at that point.

In general setup_fdt() needs to run late in the sequence, as it encodes
the setup of the machine into the device tree.

So move setup_fdt() out of kvm__arch_setup_firmware() and make it a
firmware_init() call of its own.

With this patch I am able to boot guests again on HV KVM.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/powerpc/kvm.c