KVM: arm64: Remove host_cpu_context member from vcpu structure
authorMarc Zyngier <maz@kernel.org>
Fri, 5 Jun 2020 13:08:13 +0000 (14:08 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 9 Jun 2020 09:59:52 +0000 (10:59 +0100)
commit07da1ffaa1373f99331712faa67a00b5b807dfe8
treec3c5e732314aabf8e6e3a33abdcd05fe99048cd6
parentb990d37fdf6781fd0907ffd14d0dff16b5d58ffa
KVM: arm64: Remove host_cpu_context member from vcpu structure

For very long, we have kept this pointer back to the per-cpu
host state, despite having working per-cpu accessors at EL2
for some time now.

Recent investigations have shown that this pointer is easy
to abuse in preemptible context, which is a sure sign that
it would better be gone. Not to mention that a per-cpu
pointer is faster to access at all times.

Reported-by: Andrew Scull <ascull@google.com>
Acked-by: Mark Rutland <mark.rutland@arm.com
Reviewed-by: Andrew Scull <ascull@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp/debug-sr.c
arch/arm64/kvm/hyp/switch.c
arch/arm64/kvm/hyp/sysreg-sr.c
arch/arm64/kvm/pmu.c