diff options
author | Christoffer Dall <cdall@linaro.org> | 2017-05-06 20:01:24 +0200 |
---|---|---|
committer | Christoffer Dall <cdall@linaro.org> | 2017-05-23 12:48:22 +0200 |
commit | abd7229626b9339e378a8cfcdebe0c0943b06a7f (patch) | |
tree | e50cebd5e9f2e9386da1b39e7bfbc6138cd72b4b /arch/arm/include | |
parent | 3197191e5525ea7cf8b3fdd9afc75ab5779d21fd (diff) | |
download | op-kernel-dev-abd7229626b9339e378a8cfcdebe0c0943b06a7f.zip op-kernel-dev-abd7229626b9339e378a8cfcdebe0c0943b06a7f.tar.gz |
KVM: arm/arm64: Simplify active_change_prepare and plug race
We don't need to stop a specific VCPU when changing the active state,
because private IRQs can only be modified by a running VCPU for the
VCPU itself and it is therefore already stopped.
However, it is also possible for two VCPUs to be modifying the active
state of SPIs at the same time, which can cause the thread being stuck
in the loop that checks other VCPU threads for a potentially very long
time, or to modify the active state of a running VCPU. Fix this by
serializing all accesses to setting and clearing the active state of
interrupts using the KVM mutex.
Reported-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/kvm_host.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index f0e6657..12274d4 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h @@ -233,8 +233,6 @@ struct kvm_vcpu *kvm_arm_get_running_vcpu(void); struct kvm_vcpu __percpu **kvm_get_running_vcpus(void); void kvm_arm_halt_guest(struct kvm *kvm); void kvm_arm_resume_guest(struct kvm *kvm); -void kvm_arm_halt_vcpu(struct kvm_vcpu *vcpu); -void kvm_arm_resume_vcpu(struct kvm_vcpu *vcpu); int kvm_arm_copy_coproc_indices(struct kvm_vcpu *vcpu, u64 __user *uindices); unsigned long kvm_arm_num_coproc_regs(struct kvm_vcpu *vcpu); |