linux/arch/arm64/kvm
Marc Zyngier 3579dc742f 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...

Fixes: f156a7d13f ("KVM: arm64: Remove size-order align in the nVHE hyp private VA range")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/79b0ad6e-0c2a-f777-d504-e40e8123d81d@samsung.com
Link: https://lore.kernel.org/r/20230828153121.4179627-1-maz@kernel.org
2023-09-12 12:58:25 +01:00
..
hyp ARM: 2023-09-07 13:52:20 -07:00
vgic KVM: arm64: Remove unused declarations 2023-08-15 20:27:32 +01:00
.gitignore KVM: arm64: Generate hyp_constants.h for the host 2021-12-06 08:37:03 +00:00
arch_timer.c KVM: arm64: timers: Use CNTHCTL_EL2 when setting non-CNTKCTL_EL1 bits 2023-07-11 19:28:30 +00:00
arm.c KVM/arm64 updates for Linux 6.6 2023-08-31 13:18:53 -04:00
debug.c arm64/sysreg: Rename TRBIDR_EL1 fields per auto-gen tools format 2023-06-14 14:37:33 +01:00
emulate-nested.c KVM: arm64: nv: Add trap description for SPSR_EL2 and ELR_EL2 2023-08-23 20:03:25 +01:00
fpsimd.c KVM: arm64: Rework CPTR_EL2 programming for HVHE configuration 2023-06-12 23:17:24 +00:00
guest.c KVM: arm64: Always return generic v8 as the preferred target 2023-07-11 09:40:52 +01:00
handle_exit.c KVM: arm64: nv: Expand ERET trap forwarding to handle FGT 2023-08-17 10:00:27 +01:00
hypercalls.c s390: 2023-05-01 12:06:20 -07:00
inject_fault.c KVM: arm64: Fix repeated words in comments 2023-04-21 13:46:04 +01:00
Kconfig Merge branch kvm-arm64/tlbi-range into kvmarm-master/next 2023-08-28 09:29:02 +01:00
Makefile KVM: arm64: nv: Filter out unsupported features from ID regs 2023-02-11 10:13:30 +00:00
mmio.c KVM: arm64: Generalise VM features into a set of flags 2022-03-18 14:02:33 +00:00
mmu.c KVM: arm64: Properly return allocated EL2 VA from hyp_alloc_private_va_range() 2023-09-12 12:58:25 +01:00
nested.c KVM: arm64: nv: Add support for HCRX_EL2 2023-08-17 10:00:28 +01:00
pkvm.c KVM: arm64: Handle kvm_arm_init failure correctly in finalize_pkvm 2023-07-11 19:30:14 +00:00
pmu-emul.c KVM: arm64: PMU: Don't advertise STALL_SLOT_{FRONTEND,BACKEND} 2023-08-20 09:42:16 +01:00
pmu.c KVM: arm64: pmu: Resync EL0 state on counter rotation 2023-08-22 13:35:51 +01:00
psci.c Merge branch kvm-arm64/smccc-filtering into kvmarm-master/next 2023-04-21 09:44:32 +01:00
pvtime.c KVM: MMU: Make the definition of 'INVALID_GPA' common 2023-01-19 21:48:38 +00:00
reset.c KVM: arm64: Delete pointless switch statement in kvm_reset_vcpu() 2023-07-11 09:40:52 +01:00
stacktrace.c arm64: stacktrace: track hyp stacks in unwinder's address space 2022-09-09 12:30:08 +01:00
sys_regs.c KVM: arm64: nv: Add support for HCRX_EL2 2023-08-17 10:00:28 +01:00
sys_regs.h KVM: arm64: Save ID registers' sanitized value per guest 2023-06-15 12:55:08 +00:00
trace_arm.h KVM: arm64: nv: Add trap forwarding infrastructure 2023-08-17 10:00:27 +01:00
trace_handle_exit.h KVM: arm64: Upgrade trace_kvm_arm_set_dreg32() to 64bit 2021-08-20 11:12:18 +01:00
trace.h
trng.c KVM: arm64: Implement the TRNG hypervisor call 2021-01-25 22:19:31 +00:00
va_layout.c arm64: alternatives: kvm: prepare for cap changes 2022-09-16 17:15:02 +01:00
vgic-sys-reg-v3.c KVM: arm64: vgic-v3: Convert userspace accessors over to FIELD_GET/FIELD_PREP 2022-07-17 11:55:33 +01:00
vmid.c KVM: arm64: Use the bitmap API to allocate bitmaps 2023-04-20 09:10:28 +01:00