]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: arm64: Configure VTCR_EL2 per VM
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Wed, 26 Sep 2018 16:32:43 +0000 (17:32 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 1 Oct 2018 12:50:29 +0000 (13:50 +0100)
commitb2672db8aa635e6c82d170d26ec0acb6ed0abecb
tree2521cc98acc3bd7c5a307d6814bcabf7433fc0e7
parent3d79d82f8d596e3e825dd3dccef7a74e1a8dae73
kvm: arm64: Configure VTCR_EL2 per VM

Add support for setting the VTCR_EL2 per VM, rather than hard
coding a value at boot time per CPU. This would allow us to tune
the stage2 page table parameters per VM in the later changes.

We compute the VTCR fields based on the system wide sanitised
feature registers, except for the hardware management of Access
Flags (VTCR_EL2.HA). It is fine to run a system with a mix of
CPUs that may or may not update the page table Access Flags.
Since the bit is RES0 on CPUs that don't support it, the bit
should be ignored on them.

Suggested-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <cdall@kernel.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/kvm_arm.h
arch/arm64/include/asm/kvm_asm.h
arch/arm64/include/asm/kvm_host.h
arch/arm64/include/asm/kvm_hyp.h
arch/arm64/kvm/hyp/Makefile
arch/arm64/kvm/hyp/s2-setup.c [deleted file]
arch/arm64/kvm/reset.c