diff options
author | David S. Miller <davem@davemloft.net> | 2016-04-09 23:41:41 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-09 23:41:41 +0200 |
commit | ae95d7126104591348d37aaf78c8325967e02386 (patch) | |
tree | 3270712f030549d77d4c55246d056e02b9def29d /arch/arm64/kvm/hyp/s2-setup.c | |
parent | ipv6: fix inet6_lookup_listener() (diff) | |
parent | Merge tag 'tty-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/greg... (diff) | |
download | linux-ae95d7126104591348d37aaf78c8325967e02386.tar.xz linux-ae95d7126104591348d37aaf78c8325967e02386.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'arch/arm64/kvm/hyp/s2-setup.c')
-rw-r--r-- | arch/arm64/kvm/hyp/s2-setup.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm64/kvm/hyp/s2-setup.c b/arch/arm64/kvm/hyp/s2-setup.c index bfc54fd82797..5a9f3bf542b0 100644 --- a/arch/arm64/kvm/hyp/s2-setup.c +++ b/arch/arm64/kvm/hyp/s2-setup.c @@ -36,8 +36,10 @@ void __hyp_text __init_stage2_translation(void) * Read the VMIDBits bits from ID_AA64MMFR1_EL1 and set the VS * bit in VTCR_EL2. */ - tmp = (read_sysreg(id_aa64mmfr1_el1) >> 4) & 0xf; - val |= (tmp == 2) ? VTCR_EL2_VS : 0; + tmp = (read_sysreg(id_aa64mmfr1_el1) >> ID_AA64MMFR1_VMIDBITS_SHIFT) & 0xf; + val |= (tmp == ID_AA64MMFR1_VMIDBITS_16) ? + VTCR_EL2_VS_16BIT : + VTCR_EL2_VS_8BIT; write_sysreg(val, vtcr_el2); } |