Skip to content

Commit

Permalink
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":
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 <[email protected]>
Cc: K. Y. Srinivasan <[email protected]>
Cc: Haiyang Zhang <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Andy King <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: George Zhang <[email protected]>
Cc: Jorgen Hansen <[email protected]>
Cc: Reilly Grant <[email protected]>
Cc: Asias He <[email protected]>
Cc: Stefan Hajnoczi <[email protected]>
Cc: Vitaly Kuznetsov <[email protected]>
Cc: Cathy Avery <[email protected]>
Cc: Rolf Neugebauer <[email protected]>
Cc: Marcelo Cerri <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • 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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
vmw_vsock_virtio_transport_common.

config HYPERV_VSOCKETS
tristate "Hyper-V transport for Virtual Sockets"
depends on VSOCKETS && HYPERV
help
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit ae0078f

Please sign in to comment.