]> 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)
commitbe5e99639e8abb892bc185b0054e819ab9cea46c
tree953eef01f576a913fa3088803ae225dd2b7ba35e
parent33a1ae1619ae02facbf5aa0c0e7faf72ba3c6be3
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