Commit f979c224 authored by Josh Cartwright's avatar Josh Cartwright Committed by Sebastian Andrzej Siewior
Browse files

KVM: arm/arm64: downgrade preempt_disable()d region to migrate_disable()



kvm_arch_vcpu_ioctl_run() disables the use of preemption when updating
the vgic and timer states to prevent the calling task from migrating to
another CPU.  It does so to prevent the task from writing to the
incorrect per-CPU GIC distributor registers.

On -rt kernels, it's possible to maintain the same guarantee with the
use of migrate_{disable,enable}(), with the added benefit that the
migrate-disabled region is preemptible.  Update
kvm_arch_vcpu_ioctl_run() to do so.

Cc: Christoffer Dall <christoffer.dall@linaro.org>
Reported-by: default avatarManish Jaggi <Manish.Jaggi@caviumnetworks.com>
Signed-off-by: default avatarJosh Cartwright <joshc@ni.com>
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
parent 5ba7608d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment