]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Enable pvspinlock after jump_label_init() to avoid VM hang
authorRaghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Wed, 9 Oct 2013 09:03:21 +0000 (14:33 +0530)
committerGleb Natapov <gleb@redhat.com>
Tue, 15 Oct 2013 11:15:54 +0000 (14:15 +0300)
commit0fc408d2b6c3785f679f34cd3c1e2f588fdd38c7
treed5aebb38746adcf68ce226d5b0f9f3093fc8b9e7
parent8390619a4f6f984206dacebd669641d64a1de9cf
KVM: Enable pvspinlock after jump_label_init() to avoid VM hang

We use jump label to enable pv-spinlock. With the changes in (d522fa65fc23
Merge branch 'x86/jumplabel'), the jump label behaviour has changed
that would result in eventual hang of the VM since we would end up in a
situation where slow path locks would halt the vcpus but we will not be
able to wakeup the vcpu by lock releaser using unlock kick.

Similar problem in Xen and more detailed description is available in
46271cafbbbe (xen: Do not enable spinlocks before jump_label_init()
has executed)

This patch splits kvm_spinlock_init to separate jump label changes with
pvops patching and also make jump label enabling after jump_label_init().

Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
arch/x86/kernel/kvm.c