]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - arch/powerpc/kvm/powerpc.c
powerpc/kvm/book3s_hv: Use threads_per_subcore in KVM
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 23 May 2014 08:15:29 +0000 (18:15 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 28 May 2014 03:35:37 +0000 (13:35 +1000)
commit3102f7843c75014fa15d3e6fda3b49f61bc467b4
tree16ab9545e46162b3c6735d13be0b8a04292b7098
parent6f5e40a3001d2497a134386a173e3ec3fdf2ad0b
powerpc/kvm/book3s_hv: Use threads_per_subcore in KVM

To support split core on POWER8 we need to modify various parts of the
KVM code to use threads_per_subcore instead of threads_per_core. On
systems that do not support split core threads_per_subcore ==
threads_per_core and these changes are a nop.

We use threads_per_subcore as the value reported by KVM_CAP_PPC_SMT.
This communicates to userspace that guests can only be created with
a value of threads_per_core that is less than or equal to the current
threads_per_subcore. This ensures that guests can only be created with a
thread configuration that we are able to run given the current split
core mode.

Although threads_per_subcore can change during the life of the system,
the commit that enables that will ensure that threads_per_subcore does
not change during the life of a KVM VM.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Alexander Graf <agraf@suse.de>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/powerpc.c