]> www.infradead.org Git - users/dwmw2/linux.git/commit
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>
Wed, 9 Mar 2022 16:52:19 +0000 (11:52 -0500)
commitdf1ff069f9773ab28f1d2d6349436d5fefcefb0c
tree545e66efae30b91e030b3735db5fe1bc3432aff1
parent112f161b886ee9d8639c1d0d278417e6c5ca9b45
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