]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: Rework kvm_pgtable initialisation
authorMarc Zyngier <maz@kernel.org>
Mon, 29 Nov 2021 20:00:45 +0000 (20:00 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 16 Dec 2021 17:01:05 +0000 (17:01 +0000)
commit9d8604b28575ccab3afd8d6f56cab9a6c0d281ef
treed4af915ba4f5d62d37ab6d53b55344630852900f
parent142ff9bddbde757674c7081ffc238cfcffa1859b
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: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
Reviewed-by: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211129200150.351436-5-maz@kernel.org
arch/arm64/include/asm/kvm_pgtable.h
arch/arm64/kvm/hyp/nvhe/mem_protect.c
arch/arm64/kvm/hyp/pgtable.c
arch/arm64/kvm/mmu.c