Skip to content
Commit 48e5b68b authored by Marc Zyngier's avatar Marc Zyngier Committed by James Clark
Browse files

KVM: arm64: Properly return allocated EL2 VA from hyp_alloc_private_va_range()



Marek reports that his RPi4 spits out a warning at boot time,
right at the point where the GICv2 virtual CPU interface gets
mapped.

Upon investigation, it seems that we never return the allocated
VA and use whatever was on the stack at this point. Yes, this
is good stuff, and Marek was pretty lucky that he ended-up with
a VA that intersected with something that was already mapped.

On my setup, this random value is plausible enough for the mapping
to take place. Who knows what happens...

Cc: Vincent Donnefort <vdonnefort@google.com>
Fixes: f156a7d1 ("KVM: arm64: Remove size-order align in the nVHE hyp private VA range")
Reported-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Tested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/79b0ad6e-0c2a-f777-d504-e40e8123d81d@samsung.com


Reviewed-by: default avatarVincent Donnefort <vdonnefort@google.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
parent bb62026e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment