diff options
author | Suzuki K Poulose <suzuki.poulose@arm.com> | 2018-09-26 17:32:49 +0100 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2018-10-01 13:50:32 +0100 |
commit | 13ac4bbcc457d3925b4031cc70e3031fd8b9c3b7 (patch) | |
tree | 0dae8da91a6f4a1e128b621b9d69e9702da7fb5d /arch/arm64/kvm/reset.c | |
parent | 7e8130456e067f49693fdcc25b5ba242a9c5568b (diff) | |
download | linux-13ac4bbcc457d3925b4031cc70e3031fd8b9c3b7.tar.gz linux-13ac4bbcc457d3925b4031cc70e3031fd8b9c3b7.tar.bz2 linux-13ac4bbcc457d3925b4031cc70e3031fd8b9c3b7.zip |
kvm: arm64: Switch to per VM IPA limit
Now that we can manage the stage2 page table per VM, switch the
configuration details to per VM instance. The VTCR is updated
with the values specific to the VM based on the configuration.
We store the IPA size and the number of stage2 page table levels
for the guest already in VTCR. Decode it back from the vtcr
field wherever we need it.
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Christoffer Dall <cdall@kernel.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/kvm/reset.c')
-rw-r--r-- | arch/arm64/kvm/reset.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c index 1ced1e37374e..2bf41e007390 100644 --- a/arch/arm64/kvm/reset.c +++ b/arch/arm64/kvm/reset.c @@ -160,7 +160,7 @@ int kvm_arm_config_vm(struct kvm *kvm, unsigned long type) if (phys_shift > KVM_PHYS_SHIFT) phys_shift = KVM_PHYS_SHIFT; vtcr |= VTCR_EL2_T0SZ(phys_shift); - vtcr |= VTCR_EL2_LVLS_TO_SL0(kvm_stage2_levels(kvm)); + vtcr |= VTCR_EL2_LVLS_TO_SL0(stage2_pgtable_levels(phys_shift)); /* * Enable the Hardware Access Flag management, unconditionally |