arm/arm64: KVM: rework MPIDR assignment and add accessors
authorAndre Przywara <andre.przywara@arm.com>
Mon, 2 Jun 2014 13:37:13 +0000 (15:37 +0200)
committerChristoffer Dall <christoffer.dall@linaro.org>
Tue, 20 Jan 2015 17:25:17 +0000 (18:25 +0100)
commit4429fc64b90368e9bc93f933ea8b011d8db3a2f2
treea7cb2e3dbebe4c2d6dc7a17e648a04b1c82090b9
parent7276030a082c9c33150e5900a80e26c6e3189b16
arm/arm64: KVM: rework MPIDR assignment and add accessors

The virtual MPIDR registers (containing topology information) for the
guest are currently mapped linearily to the vcpu_id. Improve this
mapping for arm64 by using three levels to not artificially limit the
number of vCPUs.
To help this, change and rename the kvm_vcpu_get_mpidr() function to
mask off the non-affinity bits in the MPIDR register.
Also add an accessor to later allow easier access to a vCPU with a
given MPIDR. Use this new accessor in the PSCI emulation.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/include/asm/kvm_emulate.h
arch/arm/include/asm/kvm_host.h
arch/arm/kvm/arm.c
arch/arm/kvm/psci.c
arch/arm64/include/asm/kvm_emulate.h
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/sys_regs.c