]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Create nVHE copy of cpu_logical_map
authorDavid Brazdil <dbrazdil@google.com>
Wed, 2 Dec 2020 18:41:10 +0000 (18:41 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 4 Dec 2020 10:08:34 +0000 (10:08 +0000)
commit750f94aedd810f7c45ade02e0b060b3fb7b0387d
tree953eef01f576a913fa3088803ae225dd2b7ba35e
parent1788694515e3b31701622b0dfb9c452d2434551b
KVM: arm64: Create nVHE copy of cpu_logical_map

When KVM starts validating host's PSCI requests, it will need to map
MPIDR back to the CPU ID. To this end, copy cpu_logical_map into nVHE
hyp memory when KVM is initialized.

Only copy the information for CPUs that are online at the point of KVM
initialization so that KVM rejects CPUs whose features were not checked
against the finalized capabilities.

Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201202184122.26046-15-dbrazdil@google.com
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp/nvhe/hyp-smp.c