Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fix from Gleb Natapov.

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: Enable pvspinlock after jump_label_init() to avoid VM hang

+15 -4
+15 -4
arch/x86/kernel/kvm.c
··· 775 775 if (!kvm_para_has_feature(KVM_FEATURE_PV_UNHALT)) 776 776 return; 777 777 778 - printk(KERN_INFO "KVM setup paravirtual spinlock\n"); 779 - 780 - static_key_slow_inc(&paravirt_ticketlocks_enabled); 781 - 782 778 pv_lock_ops.lock_spinning = PV_CALLEE_SAVE(kvm_lock_spinning); 783 779 pv_lock_ops.unlock_kick = kvm_unlock_kick; 784 780 } 781 + 782 + static __init int kvm_spinlock_init_jump(void) 783 + { 784 + if (!kvm_para_available()) 785 + return 0; 786 + if (!kvm_para_has_feature(KVM_FEATURE_PV_UNHALT)) 787 + return 0; 788 + 789 + static_key_slow_inc(&paravirt_ticketlocks_enabled); 790 + printk(KERN_INFO "KVM setup paravirtual spinlock\n"); 791 + 792 + return 0; 793 + } 794 + early_initcall(kvm_spinlock_init_jump); 795 + 785 796 #endif /* CONFIG_PARAVIRT_SPINLOCKS */