KVM: x86/xen: handle PV spinlocks slowpath
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 3 Mar 2022 15:41:26 +0000 (15:41 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 2 Apr 2022 09:41:17 +0000 (05:41 -0400)
commit1a65105a5aba9f7c6ea68cf687e569d055a94685
tree1567c60b602208d83bd54d4c8899fe83590615f7
parent661a20fab7d156cf6b9a407c946a1e558a633151
KVM: x86/xen: handle PV spinlocks slowpath

Add support for SCHEDOP_poll hypercall.

This implementation is optimized for polling for a single channel, which
is what Linux does. Polling for multiple channels is not especially
efficient (and has not been tested).

PV spinlocks slow path uses this hypercall, and explicitly crash if it's
not supported.

[ dwmw2: Rework to use kvm_vcpu_halt(), not supported for 32-bit guests ]

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220303154127.202856-17-dwmw2@infradead.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/xen.c
tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c