]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - include/uapi/linux/kvm.h
kvm: x86: hyperv: guest->host event signaling via eventfd
authorRoman Kagan <rkagan@virtuozzo.com>
Thu, 1 Feb 2018 13:48:32 +0000 (16:48 +0300)
committerRadim Krčmář <rkrcmar@redhat.com>
Tue, 6 Mar 2018 17:40:36 +0000 (18:40 +0100)
commitfaeb7833eee0d6afe0ecb6bdfa6042556c2c352e
tree894003ec025273ac159e9a57f9fc98c2dac180e0
parentcbc0236a4b3e6a64f5b8bee27b530c7f8bee8d56
kvm: x86: hyperv: guest->host event signaling via eventfd

In Hyper-V, the fast guest->host notification mechanism is the
SIGNAL_EVENT hypercall, with a single parameter of the connection ID to
signal.

Currently this hypercall incurs a user exit and requires the userspace
to decode the parameters and trigger the notification of the potentially
different I/O context.

To avoid the costly user exit, process this hypercall and signal the
corresponding eventfd in KVM, similar to ioeventfd.  The association
between the connection id and the eventfd is established via the newly
introduced KVM_HYPERV_EVENTFD ioctl, and maintained in an
(srcu-protected) IDR.

Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
[asm/hyperv.h changes approved by KY Srinivasan. - Radim]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Documentation/virtual/kvm/api.txt
arch/x86/include/asm/kvm_host.h
arch/x86/include/uapi/asm/hyperv.h
arch/x86/kvm/hyperv.c
arch/x86/kvm/hyperv.h
arch/x86/kvm/x86.c
include/uapi/linux/kvm.h