linux/virt/kvm/arm
Marc Zyngier 1f03b2bcd0 KVM: Disable preemption in kvm_get_running_vcpu()
Accessing a per-cpu variable only makes sense when preemption is
disabled (and the kernel does check this when the right debug options
are switched on).

For kvm_get_running_vcpu(), it is fine to return the value after
re-enabling preemption, as the preempt notifiers will make sure that
this is kept consistent across task migration (the comment above the
function hints at it, but lacks the crucial preemption management).

While we're at it, move the comment from the ARM code, which explains
why the whole thing works.

Fixes: 7495e22bb1 ("KVM: Move running VCPU from ARM to common code").
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reported-by: Zenghui Yu <yuzenghui@huawei.com>
Tested-by: Zenghui Yu <yuzenghui@huawei.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/318984f6-bc36-33a3-abc6-bf2295974b06@huawei.com
Message-id: <20200207163410.31276-1-maz@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-02-12 12:19:35 +01:00
..
hyp KVM: arm: vgic-v3: Mark expected switch fall-through 2019-07-26 15:37:11 +01:00
vgic KVM: Disable preemption in kvm_get_running_vcpu() 2020-02-12 12:19:35 +01:00
aarch32.c KVM: arm: Make inject_abt32() inject an external abort instead 2020-01-23 10:38:15 +00:00
arch_timer.c KVM/arm updates for Linux 5.6 2020-01-30 18:13:14 +01:00
arm.c KVM/arm updates for Linux 5.6 2020-01-30 18:13:14 +01:00
hypercalls.c KVM: arm64: Support stolen time reporting via shared structure 2019-10-21 19:20:28 +01:00
mmio.c KVM: arm/arm64: Cleanup MMIO handling 2020-01-23 10:38:14 +00:00
mmu.c KVM/arm updates for Linux 5.6 2020-01-30 18:13:14 +01:00
perf.c KVM: Move running VCPU from ARM to common code 2020-01-27 19:59:54 +01:00
pmu.c KVM: arm64: pmu: Only handle supported event counters 2020-01-28 13:05:05 +00:00
psci.c KVM: arm/arm64: Factor out hypercall handling from PSCI code 2019-10-21 19:20:26 +01:00
pvtime.c KVM: arm64: Provide VCPU attributes for stolen time 2019-10-21 19:20:29 +01:00
trace.h KVM: arm/arm64: Fix TRACE_INCLUDE_PATH 2019-02-19 21:05:51 +00:00