]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Factor out stage 2 page table data from struct kvm
authorChristoffer Dall <christoffer.dall@arm.com>
Fri, 4 Jan 2019 20:09:05 +0000 (21:09 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 7 Jul 2020 08:28:37 +0000 (09:28 +0100)
commit5f1ea58560540e4a269b2aaa876366b58dbc1bcb
tree6df05ab2372edd3bdd87f49e692cc0cac333f726
parentc589021c09c977cbe371853c13adb6608148ca0f
KVM: arm64: Factor out stage 2 page table data from struct kvm

As we are about to reuse our stage 2 page table manipulation code for
shadow stage 2 page tables in the context of nested virtualization, we
are going to manage multiple stage 2 page tables for a single VM.

This requires some pretty invasive changes to our data structures,
which moves the vmid and pgd pointers into a separate structure and
change pretty much all of our mmu code to operate on this structure
instead.

The new structure is called struct kvm_s2_mmu.

There is no intended functional change by this patch alone.

Reviewed-by: James Morse <james.morse@arm.com>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
[Designed data structure layout in collaboration]
Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
Co-developed-by: Marc Zyngier <maz@kernel.org>
[maz: Moved the last_vcpu_ran down to the S2 MMU structure as well]
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_asm.h
arch/arm64/include/asm/kvm_host.h
arch/arm64/include/asm/kvm_mmu.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp/include/hyp/switch.h
arch/arm64/kvm/hyp/nvhe/switch.c
arch/arm64/kvm/hyp/nvhe/tlb.c
arch/arm64/kvm/hyp/vhe/switch.c
arch/arm64/kvm/hyp/vhe/tlb.c
arch/arm64/kvm/mmu.c