|
@@ -748,6 +748,10 @@ void __init kvm_spinlock_init(void)
|
|
|
if (kvm_para_has_hint(KVM_HINTS_REALTIME))
|
|
if (kvm_para_has_hint(KVM_HINTS_REALTIME))
|
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
|
|
+ /* Don't use the pvqspinlock code if there is only 1 vCPU. */
|
|
|
|
|
+ if (num_possible_cpus() == 1)
|
|
|
|
|
+ return;
|
|
|
|
|
+
|
|
|
__pv_init_lock_hash();
|
|
__pv_init_lock_hash();
|
|
|
pv_lock_ops.queued_spin_lock_slowpath = __pv_queued_spin_lock_slowpath;
|
|
pv_lock_ops.queued_spin_lock_slowpath = __pv_queued_spin_lock_slowpath;
|
|
|
pv_lock_ops.queued_spin_unlock = PV_CALLEE_SAVE(__pv_queued_spin_unlock);
|
|
pv_lock_ops.queued_spin_unlock = PV_CALLEE_SAVE(__pv_queued_spin_unlock);
|