]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: PPC: Book3S HV: Allow KVM guests to stop secondary threads coming online
authorPaul Mackerras <paulus@samba.org>
Mon, 15 Oct 2012 01:15:41 +0000 (01:15 +0000)
committerAlexander Graf <agraf@suse.de>
Tue, 30 Oct 2012 09:54:10 +0000 (10:54 +0100)
commit61b2680c71ba1d44f191a1aaf616c1daef90e577
tree8cb0fb7f8cdc1b0283ef7cba585775f47b974ebc
parent00ce618448ea78e258f0ccd52af1d57b6a9fca77
KVM: PPC: Book3S HV: Allow KVM guests to stop secondary threads coming online

When a Book3S HV KVM guest is running, we need the host to be in
single-thread mode, that is, all of the cores (or at least all of
the cores where the KVM guest could run) to be running only one
active hardware thread.  This is because of the hardware restriction
in POWER processors that all of the hardware threads in the core
must be in the same logical partition.  Complying with this restriction
is much easier if, from the host kernel's point of view, only one
hardware thread is active.

This adds two hooks in the SMP hotplug code to allow the KVM code to
make sure that secondary threads (i.e. hardware threads other than
thread 0) cannot come online while any KVM guest exists.  The KVM
code still has to check that any core where it runs a guest has the
secondary threads offline, but having done that check it can now be
sure that they will not come online while the guest is running.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/include/asm/smp.h
arch/powerpc/kernel/smp.c
arch/powerpc/kvm/book3s_hv.c