kvm: arm64: Add helpers for accessing nVHE hyp per-cpu vars
authorDavid Brazdil <dbrazdil@google.com>
Tue, 22 Sep 2020 20:49:06 +0000 (21:49 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 30 Sep 2020 07:37:13 +0000 (08:37 +0100)
commit572494995bc3d282336bfd8162741929402910b9
tree9929b417abf64374ef4367bf8f884524fc2672e0
parentea391027d35546d9155f1350123b5af8bddec706
kvm: arm64: Add helpers for accessing nVHE hyp per-cpu vars

Defining a per-CPU variable in hyp/nvhe will result in its name being
prefixed with __kvm_nvhe_. Add helpers for declaring these variables
in kernel proper and accessing them with this_cpu_ptr and per_cpu_ptr.

Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20200922204910.7265-7-dbrazdil@google.com
arch/arm64/include/asm/kvm_asm.h