]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: arm64: Set up hyp percpu data for nVHE
authorDavid Brazdil <dbrazdil@google.com>
Tue, 22 Sep 2020 20:49:09 +0000 (21:49 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 30 Sep 2020 07:37:14 +0000 (08:37 +0100)
commit18dfe940774ce16741e59f99ee0db27e1c8ae3cc
tree525991f0ee45ff0992dae3b2858030d5f622b1d2
parent8d5b3b7a09c0fdd81eec61f0ea29b133f0fbe467
kvm: arm64: Set up hyp percpu data for nVHE

Add hyp percpu section to linker script and rename the corresponding ELF
sections of hyp/nvhe object files. This moves all nVHE-specific percpu
variables to the new hyp percpu section.

Allocate sufficient amount of memory for all percpu hyp regions at global KVM
init time and create corresponding hyp mappings.

The base addresses of hyp percpu regions are kept in a dynamically allocated
array in the kernel.

Add NULL checks in PMU event-reset code as it may run before KVM memory is
initialized.

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-10-dbrazdil@google.com
arch/arm64/include/asm/kvm_asm.h
arch/arm64/kernel/vmlinux.lds.S
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp/nvhe/hyp.lds.S
arch/arm64/kvm/pmu.c