diff options
author | Vladimir Murzin <vladimir.murzin@arm.com> | 2015-11-16 11:28:18 +0000 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2015-12-18 10:15:12 +0000 |
commit | 20475f784d29991b3b843c80c38a36f2ebb35ac4 (patch) | |
tree | fce9116aeb5f04122e323a240daeb5a018feb360 /arch/arm64/kvm/hyp-init.S | |
parent | 8420dcd37ef34040c8fc5a27bf66887b3b2faf80 (diff) | |
download | linux-20475f784d29991b3b843c80c38a36f2ebb35ac4.tar.gz linux-20475f784d29991b3b843c80c38a36f2ebb35ac4.tar.bz2 linux-20475f784d29991b3b843c80c38a36f2ebb35ac4.zip |
arm64: KVM: Add support for 16-bit VMID
The ARMv8.1 architecture extension allows to choose between 8-bit and
16-bit of VMID, so use this capability for KVM.
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/kvm/hyp-init.S')
-rw-r--r-- | arch/arm64/kvm/hyp-init.S | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S index 178ba2248a98..3e568dcd907b 100644 --- a/arch/arm64/kvm/hyp-init.S +++ b/arch/arm64/kvm/hyp-init.S @@ -94,6 +94,15 @@ __do_hyp_init: */ mrs x5, ID_AA64MMFR0_EL1 bfi x4, x5, #16, #3 + /* + * Read the VMIDBits bits from ID_AA64MMFR1_EL1 and set the VS bit in + * VTCR_EL2. + */ + mrs x5, ID_AA64MMFR1_EL1 + ubfx x5, x5, #5, #1 + lsl x5, x5, #VTCR_EL2_VS + orr x4, x4, x5 + msr vtcr_el2, x4 mrs x4, mair_el1 |