[PATCH 2/3] KVM: arm/arm64: fix HYP ID map extension to 52 bits

Marc Zyngier marc.zyngier at arm.com
Mon Jan 15 10:00:24 PST 2018


On 15/01/18 15:23, Kristina Martsenko wrote:
> 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")
> Signed-off-by: Kristina Martsenko <kristina.martsenko at arm.com>

Acked-by: Marc Zyngier <marc.zyngier at arm.com>

	M.
-- 
Jazz is not dead. It just smells funny...



More information about the linux-arm-kernel mailing list