Skip to content


hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)
Browse files Browse the repository at this point in the history
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":

The patch implements the necessary support in Linux guest by introducing a new
vsock transport for AF_VSOCK.

Signed-off-by: Dexuan Cui <>
Cc: K. Y. Srinivasan <>
Cc: Haiyang Zhang <>
Cc: Stephen Hemminger <>
Cc: Andy King <>
Cc: Dmitry Torokhov <>
Cc: George Zhang <>
Cc: Jorgen Hansen <>
Cc: Reilly Grant <>
Cc: Asias He <>
Cc: Stefan Hajnoczi <>
Cc: Vitaly Kuznetsov <>
Cc: Cathy Avery <>
Cc: Rolf Neugebauer <>
Cc: Marcelo Cerri <>
Signed-off-by: David S. Miller <>
  • Loading branch information
dcui authored and davem330 committed Aug 28, 2017
1 parent 7cadf2c commit ae0078f
Show file tree
Hide file tree
Showing 4 changed files with 920 additions and 0 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Expand Up @@ -6286,6 +6286,7 @@ F: drivers/net/hyperv/
F: drivers/scsi/storvsc_drv.c
F: drivers/uio/uio_hv_generic.c
F: drivers/video/fbdev/hyperv_fb.c
F: net/vmw_vsock/hyperv_transport.c
F: include/linux/hyperv.h
F: tools/hv/
F: Documentation/ABI/stable/sysfs-bus-vmbus
Expand Down
12 changes: 12 additions & 0 deletions net/vmw_vsock/Kconfig
Expand Up @@ -46,3 +46,15 @@ config VIRTIO_VSOCKETS_COMMON
This option is selected by any driver which needs to access
the virtio_vsock. The module will be called

tristate "Hyper-V transport for Virtual Sockets"
depends on VSOCKETS && HYPERV
This module implements a Hyper-V transport for Virtual Sockets.

Enable this transport if your Virtual Machine host supports Virtual
Sockets over Hyper-V VMBus.

To compile this driver as a module, choose M here: the module will be
called hv_sock. If unsure, say N.
3 changes: 3 additions & 0 deletions net/vmw_vsock/Makefile
Expand Up @@ -2,6 +2,7 @@ obj-$(CONFIG_VSOCKETS) += vsock.o
obj-$(CONFIG_VMWARE_VMCI_VSOCKETS) += vmw_vsock_vmci_transport.o
obj-$(CONFIG_VIRTIO_VSOCKETS) += vmw_vsock_virtio_transport.o
obj-$(CONFIG_VIRTIO_VSOCKETS_COMMON) += vmw_vsock_virtio_transport_common.o
obj-$(CONFIG_HYPERV_VSOCKETS) += hv_sock.o

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

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

vmw_vsock_virtio_transport_common-y += virtio_transport_common.o

hv_sock-y += hyperv_transport.o

0 comments on commit ae0078f

Please sign in to comment.