Commit fc13bc01 authored by Marc Zyngier's avatar Marc Zyngier Committed by Will Deacon
Browse files

FROMGIT: KVM: arm64: Rework kvm_pgtable initialisation



Ganapatrao reported that the kvm_pgtable->mmu pointer is more or
less hardcoded to the main S2 mmu structure, while the nested
code needs it to point to other instances (as we have one instance
per nested context).

Rework the initialisation of the kvm_pgtable structure so that
this assumtion doesn't hold true anymore. This requires some
minor changes to the order in which things are initialised
(the mmu->arch pointer being the critical one).

Reported-by: default avatarGanapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
Reviewed-by: default avatarGanapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211129200150.351436-5-maz@kernel.org
(cherry picked from commit 9d8604b2
 git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git

 next)
Bug: 209777660
Signed-off-by: default avatarWill Deacon <willdeacon@google.com>
Change-Id: If942bf4a01a975a60c37ad8483eafc52185234d5
parent 60bd62a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment