Re: [PATCH] kvm fix: Enable pvspinlock after jump_label_init() toavoid VM hang

From: Steven Rostedt
Date: Thu Oct 10 2013 - 10:43:55 EST


On Wed, 9 Oct 2013 14:33:21 +0530
Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx> wrote:

> We use jump label to enable pv-spinlock. With the changes in
> (442e0973e927 Merge branch 'x86/jumplabel'), the jump label behaviour has changed
> that would result in evntual hang of the VM since we would end up in a situation
> where slowpath 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
> a945928ea270 (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@xxxxxxxxxxxxxxxxxx>

Reviewed-by: Steven Rostedt <rostedt@xxxxxxxxxxx>

-- Steve

> ---
> Thanks to Andrew Theurer who reported weird behaviour of pvspinlock
> in 3.12-rc that led to my git bisection and investigation and Konrad
> for his jump label findings for Xen.
>
> arch/x86/kernel/kvm.c | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/