KVM: Check preempted_in_kernel for involuntary preemption
authorWanpeng Li <wanpengli@tencent.com>
Thu, 1 Aug 2019 03:30:14 +0000 (11:30 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 5 Aug 2019 10:55:46 +0000 (12:55 +0200)
commit046ddeed0461b5d270470c253cbb321103d048b6
tree3adf95674f267b4e056b56bd8227dde6a9eebfc6
parenta48d06f9b7cedbb8ad7804d1720168b7ee6a34e7
KVM: Check preempted_in_kernel for involuntary preemption

preempted_in_kernel is updated in preempt_notifier when involuntary preemption
ocurrs, it can be stale when the voluntarily preempted vCPUs are taken into
account by kvm_vcpu_on_spin() loop. This patch lets it just check preempted_in_kernel
for involuntary preemption.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c