linux_dsm_epyc7002/arch/arm64/kvm
Marc Zyngier 6e977984f6 KVM: arm64: Save/restore sp_el0 as part of __guest_enter
We currently save/restore sp_el0 in C code. This is a bit unsafe,
as a lot of the C code expects 'current' to be accessible from
there (and the opportunity to run kernel code in HYP is specially
great with VHE).

Instead, let's move the save/restore of sp_el0 to the assembly
code (in __guest_enter), making sure that sp_el0 is correct
very early on when we exit the guest, and is preserved as long
as possible to its host value when we enter the guest.

Reviewed-by: Andrew Jones <drjones@redhat.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2020-04-30 12:01:35 +01:00
..
hyp KVM: arm64: Save/restore sp_el0 as part of __guest_enter 2020-04-30 12:01:35 +01:00
debug.c KVM: arm64: Write arch.mdcr_el2 changes since last vcpu_load on VHE 2020-01-22 18:38:04 +00:00
fpsimd.c KVM: Remove unnecessary asm/kvm_host.h includes 2020-03-16 17:57:34 +01:00
guest.c KVM: Remove unnecessary asm/kvm_host.h includes 2020-03-16 17:57:34 +01:00
handle_exit.c KVM: arm/arm64: Factor out hypercall handling from PSCI code 2019-10-21 19:20:26 +01:00
hyp-init.S arm64: use mov_q instead of literal ldr 2020-03-24 11:48:24 +00:00
hyp.S arm64: kvm: Annotate assembly using modern annoations 2020-03-09 17:35:29 +00:00
inject_fault.c KVM: arm64: Correct PSTATE on exception entry 2020-01-19 18:06:13 +00:00
irq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
Kconfig vhost: refine vhost and vringh kconfig 2020-04-01 12:06:26 -04:00
Makefile KVM: arm64: Implement PV_TIME_FEATURES call 2019-10-21 19:20:27 +01:00
pmu.c KVM: arm64: Move pmu hyp code under hyp's Makefile to avoid instrumentation 2019-05-24 14:53:20 +01:00
regmap.c arm64: KVM: regmap: Fix unexpected switch fall-through 2019-07-26 15:33:41 +01:00
reset.c KVM: Drop kvm_arch_vcpu_init() and kvm_arch_vcpu_uninit() 2020-01-27 19:59:33 +01:00
sys_regs_generic_v8.c KVM: Remove unnecessary asm/kvm_host.h includes 2020-03-16 17:57:34 +01:00
sys_regs.c ARM: 2020-04-02 15:13:15 -07:00
sys_regs.h KVM: arm64: Sanely ratelimit sysreg messages 2019-12-06 11:41:45 +00:00
trace.h arm64: KVM: Add trapped system register access tracepoint 2018-12-19 17:47:08 +00:00
va_layout.c arm64: kvm: Fix IDMAP overlap with HYP VA 2020-01-19 16:05:23 +00:00
vgic-sys-reg-v3.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00