kvm: Paravirtual ticketlocks support for linux guests running on KVM hypervisor
authorSrivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Tue, 6 Aug 2013 09:25:41 +0000 (14:55 +0530)
committerIngo Molnar <mingo@kernel.org>
Wed, 14 Aug 2013 11:12:35 +0000 (13:12 +0200)
commit92b75202e5e8790905f9441ccaea2456cc4621a5
treec683864840122de1b5490a70bcffd29bfd6af683
parent1e20eb8557cdabf76473b09572be8aa8a2bb9bc0
kvm: Paravirtual ticketlocks support for linux guests running on KVM hypervisor

During smp_boot_cpus  paravirtualied KVM guest detects if the hypervisor has
required feature (KVM_FEATURE_PV_UNHALT) to support pv-ticketlocks. If so,
support for pv-ticketlocks is registered via pv_lock_ops.

Use KVM_HC_KICK_CPU hypercall to wakeup waiting/halted vcpu.

Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20130810193849.GA25260@linux.vnet.ibm.com
Signed-off-by: Suzuki Poulose <suzuki@in.ibm.com>
[Raghu: check_zero race fix, enum for kvm_contention_stat, jumplabel related changes,
addition of safe_halt for irq enabled case, bailout spinning in nmi case(Gleb)]
Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Acked-by: Gleb Natapov <gleb@redhat.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/include/asm/kvm_para.h
arch/x86/kernel/kvm.c