x86/hyperv: Enable PV qspinlock for Hyper-V
authorYi Sun <yi.y.sun@linux.intel.com>
Mon, 8 Oct 2018 08:29:34 +0000 (16:29 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 9 Oct 2018 12:21:39 +0000 (14:21 +0200)
commit3a025de64bf89c84a79909069e3c24ad9e710d27
tree04adc9cf615d5644da69374dbf9d70b4a33cb63d
parentf726c4620df39055f060537a8ed183c18a2c504b
x86/hyperv: Enable PV qspinlock for Hyper-V

Implement the required wait and kick callbacks to support PV spinlocks in
Hyper-V guests.

[ tglx: Document the requirement for disabling interrupts in the wait()
   callback. Remove goto and unnecessary includes. Add prototype
for hv_vcpu_is_preempted(). Adapted to pending paravirt changes. ]

Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Michael Kelley (EOSG) <Michael.H.Kelley@microsoft.com>
Cc: chao.p.peng@intel.com
Cc: chao.gao@intel.com
Cc: isaku.yamahata@intel.com
Cc: tianyu.lan@microsoft.com
Link: https://lkml.kernel.org/r/1538987374-51217-3-git-send-email-yi.y.sun@linux.intel.com
Documentation/admin-guide/kernel-parameters.txt
arch/x86/hyperv/Makefile
arch/x86/hyperv/hv_spinlock.c [new file with mode: 0644]
arch/x86/include/asm/mshyperv.h
arch/x86/kernel/cpu/mshyperv.c