diff options
author | Roman Kagan <rkagan@virtuozzo.com> | 2018-02-01 16:48:32 +0300 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2018-03-06 20:40:36 +0300 |
commit | faeb7833eee0d6afe0ecb6bdfa6042556c2c352e (patch) | |
tree | 894003ec025273ac159e9a57f9fc98c2dac180e0 /arch/x86/include/asm/kvm_host.h | |
parent | cbc0236a4b3e6a64f5b8bee27b530c7f8bee8d56 (diff) | |
download | linux-faeb7833eee0d6afe0ecb6bdfa6042556c2c352e.tar.xz |
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>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index b605a5b6a30c..df6720fc57e6 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -754,6 +754,8 @@ struct kvm_hv { u64 hv_crash_ctl; HV_REFERENCE_TSC_PAGE tsc_ref; + + struct idr conn_to_evt; }; enum kvm_irqchip_mode { |