diff options
author | Kristina Martsenko <[email protected]> | 2018-01-15 15:23:49 +0000 |
---|---|---|
committer | Catalin Marinas <[email protected]> | 2018-01-15 18:20:26 +0000 |
commit | 98732d1b189b626a7593afd02dc3d2dc3f6c545a (patch) | |
tree | 480e6be8c4dd28aaf7d29ba8f5e6445fdd739737 /net/unix/sysctl_net_unix.c | |
parent | 6a205420758af5625429a2e77a2654abbf59ac09 (diff) |
KVM: arm/arm64: fix HYP ID map extension to 52 bits
Commit fa2a8445b1d3 incorrectly masks the index of the HYP ID map pgd
entry, causing a non-VHE kernel to hang during boot. This happens when
VA_BITS=48 and the ID map text is in 52-bit physical memory. In this
case we don't need an extra table level but need more entries in the
top-level table, so we need to map into hyp_pgd and need to use
__kvm_idmap_ptrs_per_pgd to mask in the extra bits. However,
__create_hyp_mappings currently masks by PTRS_PER_PGD instead.
Fix it so that we always use __kvm_idmap_ptrs_per_pgd for the HYP ID
map. This ensures that we use the larger mask for the top-level ID map
table when it has more entries. In all other cases, PTRS_PER_PGD is used
as normal.
Fixes: fa2a8445b1d3 ("arm64: allow ID map to be extended to 52 bits")
Acked-by: Marc Zyngier <[email protected]>
Signed-off-by: Kristina Martsenko <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions