Skip to content

Commit ae0078f

Browse files
dcuidavem330
authored andcommittedAug 28, 2017
hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)
Hyper-V Sockets (hv_sock) supplies a byte-stream based communication mechanism between the host and the guest. It uses VMBus ringbuffer as the transportation layer. With hv_sock, applications between the host (Windows 10, Windows Server 2016 or newer) and the guest can talk with each other using the traditional socket APIs. More info about Hyper-V Sockets is available here: "Make your own integration services": https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service The patch implements the necessary support in Linux guest by introducing a new vsock transport for AF_VSOCK. Signed-off-by: Dexuan Cui <decui@microsoft.com> Cc: K. Y. Srinivasan <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Stephen Hemminger <sthemmin@microsoft.com> Cc: Andy King <acking@vmware.com> Cc: Dmitry Torokhov <dtor@vmware.com> Cc: George Zhang <georgezhang@vmware.com> Cc: Jorgen Hansen <jhansen@vmware.com> Cc: Reilly Grant <grantr@vmware.com> Cc: Asias He <asias@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Vitaly Kuznetsov <vkuznets@redhat.com> Cc: Cathy Avery <cavery@redhat.com> Cc: Rolf Neugebauer <rolf.neugebauer@docker.com> Cc: Marcelo Cerri <marcelo.cerri@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7cadf2c commit ae0078f

File tree

4 files changed

+920
-0
lines changed

4 files changed

+920
-0
lines changed
 

‎MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6286,6 +6286,7 @@ F: drivers/net/hyperv/
62866286
F: drivers/scsi/storvsc_drv.c
62876287
F: drivers/uio/uio_hv_generic.c
62886288
F: drivers/video/fbdev/hyperv_fb.c
6289+
F: net/vmw_vsock/hyperv_transport.c
62896290
F: include/linux/hyperv.h
62906291
F: tools/hv/
62916292
F: Documentation/ABI/stable/sysfs-bus-vmbus

‎net/vmw_vsock/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,15 @@ config VIRTIO_VSOCKETS_COMMON
4646
This option is selected by any driver which needs to access
4747
the virtio_vsock. The module will be called
4848
vmw_vsock_virtio_transport_common.
49+
50+
config HYPERV_VSOCKETS
51+
tristate "Hyper-V transport for Virtual Sockets"
52+
depends on VSOCKETS && HYPERV
53+
help
54+
This module implements a Hyper-V transport for Virtual Sockets.
55+
56+
Enable this transport if your Virtual Machine host supports Virtual
57+
Sockets over Hyper-V VMBus.
58+
59+
To compile this driver as a module, choose M here: the module will be
60+
called hv_sock. If unsure, say N.

‎net/vmw_vsock/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ obj-$(CONFIG_VSOCKETS) += vsock.o
22
obj-$(CONFIG_VMWARE_VMCI_VSOCKETS) += vmw_vsock_vmci_transport.o
33
obj-$(CONFIG_VIRTIO_VSOCKETS) += vmw_vsock_virtio_transport.o
44
obj-$(CONFIG_VIRTIO_VSOCKETS_COMMON) += vmw_vsock_virtio_transport_common.o
5+
obj-$(CONFIG_HYPERV_VSOCKETS) += hv_sock.o
56

67
vsock-y += af_vsock.o af_vsock_tap.o vsock_addr.o
78

@@ -11,3 +12,5 @@ vmw_vsock_vmci_transport-y += vmci_transport.o vmci_transport_notify.o \
1112
vmw_vsock_virtio_transport-y += virtio_transport.o
1213

1314
vmw_vsock_virtio_transport_common-y += virtio_transport_common.o
15+
16+
hv_sock-y += hyperv_transport.o

0 commit comments

Comments
 (0)