KVM: arm64: Initialize kvm_nvhe_init_params early
authorQuentin Perret <qperret@google.com>
Fri, 19 Mar 2021 10:01:12 +0000 (10:01 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 19 Mar 2021 12:01:19 +0000 (12:01 +0000)
commit9cc7758145fd24b17cff0734b7cfd80de30be052
treeb6b966b444a1b375209f01b91dc431d7e27321d2
parent67c2d326332ee28079348e43cf4f17bbfe63b260
KVM: arm64: Initialize kvm_nvhe_init_params early

Move the initialization of kvm_nvhe_init_params in a dedicated function
that is run early, and only once during KVM init, rather than every time
the KVM vectors are set and reset.

This also opens the opportunity for the hypervisor to change the init
structs during boot, hence simplifying the replacement of host-provided
page-table by the one the hypervisor will create for itself.

Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210319100146.1149909-5-qperret@google.com
arch/arm64/kvm/arm.c