[Hyper-V] Hyper-V Sockets
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Medium
|
Tim Gardner | ||
Xenial |
Fix Released
|
Medium
|
Tim Gardner |
Bug Description
Dexuan Cui of Microsoft has submitted upstream the a VM Sockets for Hyper-V feature. The V6 series of this feature set was submitted on January 26th so it seems likely that the discussion is winding down and the feature is ripe for inclusion. We'd like it considered for Ubuntu 16.04.
Here's the latest Part 0 description from lkml:
From: Dexuan Cui <email address hidden> via vger.kernel.org
Changes since v1:
- updated "[PATCH 6/7] hvsock: introduce Hyper-V VM Sockets feature"
- added __init and __exit for the module init/exit functions
- net/hv_
- MODULE_LICENSE: "Dual MIT/GPL" -> "Dual BSD/GPL"
Changes since v2:
- fixed various coding issue pointed out by David Miller
- fixed indentation issues
- removed pr_debug in net/hv_
- used reverse-
- EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL
Changes since v3:
- fixed a few coding issue pointed by Vitaly Kuznetsov and Dan Carpenter
- fixed the ret value in vmbus_recvpacke
- fixed the style of multi-line comment: vmbus_get_
Changes since v4 (https:/
- addressed all the comments about V4.
- treat the hvsock offers/channels as special VMBus devices
- add a mechanism to pass hvsock events to the hvsock driver
- fixed some corner cases with proper locking when a connection is closed
- rebased to the latest Greg's tree
Changes since v5 (https:/
- addressed the coding style issues (Vitaly Kuznetsov & David Miller, thanks!)
- used a better coding for the per-channel rescind callback (Thank Vitaly!)
- avoided the introduction of new VMBUS driver APIs vmbus_sendpacke
and vmbus_recvpacke
in the higher level (i.e., the vmsock driver). Thank Vitaly!
Hyper-V VM Socket (hv_sock) is a byte-stream based communication mechanism
between Windowsd 10 (or later) host and a guest. It's kind of TCP over
VMBus, but the transportation layer (VMBus) is much simpler than IP.
With Hyper-V VM Sockets, applications between the host and a guest can
talk with each other directly by the traditional BSD-style socket APIs.
The patchset implements the necessary support in the guest side by adding
the necessary new APIs in the vmbus driver, and introducing a new driver
hv_sock.ko, which implements_a new socket address family AF_HYPERV.
I know the kernel has already had a VM Sockets driver (AF_VSOCK) based
on VMware's VMCI (net/vmw_vsock/, drivers/
proposing AF_VSOCK of virtio version:
http://
However, though Hyper-V VM Sockets may seem conceptually similar to
AF_VOSCK, there are differences in the transportation layer, and IMO these
make the direct code reusing impractical:
1. In AF_VSOCK, the endpoint type is: <u32 ContextID, u32 Port>, but in
AF_HYPERV, the endpoint type is: <GUID VM_ID, GUID ServiceID>. Here GUID
is 128-bit.
2. AF_VSOCK supports SOCK_DGRAM, while AF_HYPERV doesn't.
3. AF_VSOCK supports some special sock opts, like SO_VM_SOCKETS_
SO_VM_
These are meaningless to AF_HYPERV.
4. Some AF_VSOCK's VMCI transportation ops are meanless to AF_HYPERV/VMBus,
like .notify_recv_init
etc.
So I think we'd better introduce a new address family: AF_HYPERV.
Please review the patchset.
Looking forward to your comments!
Dexuan Cui (9):
Drivers: hv: vmbus: add a helper function to set a channel's pending
send size
Drivers: hv: vmbus: define the new offer type for Hyper-V socket
(hvsock)
Drivers: hv: vmbus: define a new VMBus message type for hvsock
Drivers: hv: ring_buffer: enhance hv_ringbuffer_
hvsock
Drivers: hv: vmbus: add APIs to send/recv hvsock packets
Drivers: hv: vmbus: add a hvsock flag in struct hv_driver
Drivers: hv: vmbus: add a mechanism to pass hvsock events to the
hvsock driver
Drivers: hv: vmbus: add an API vmbus_hvsock_
hvsock: introduce Hyper-V VM Sockets feature
MAINTAINERS | 2 +
drivers/
drivers/
drivers/
drivers/
drivers/
drivers/
include/
include/
include/
include/
net/Kconfig | 1 +
net/Makefile | 1 +
net/hv_
net/hv_
net/hv_
16 files changed, 1830 insertions(+), 24 deletions(-)
create mode 100644 include/
create mode 100644 net/hv_sock/Kconfig
create mode 100644 net/hv_
create mode 100644 net/hv_
--
2.1.4
Dexuan Cui (8):
Drivers: hv: vmbus: add a helper function to set a channel's pending
send size
Drivers: hv: vmbus: define the new offer type for Hyper-V socket
(hvsock)
Drivers: hv: vmbus: vmbus_sendpacke
signaling
Drivers: hv: vmbus: define a new VMBus message type for hvsock
Drivers: hv: vmbus: add a hvsock flag in struct hv_driver
Drivers: hv: vmbus: add a per-channel rescind callback
Drivers: hv: vmbus: add an API vmbus_hvsock_
hvsock: introduce Hyper-V Socket feature
MAINTAINERS | 2 +
drivers/
drivers/
drivers/
drivers/
include/
include/
include/
include/
net/Kconfig | 1 +
net/Makefile | 1 +
net/hv_
net/hv_
net/hv_
14 files changed, 1702 insertions(+), 8 deletions(-)
create mode 100644 include/
create mode 100644 net/hv_sock/Kconfig
create mode 100644 net/hv_
create mode 100644 net/hv_
There are, as yet, no pieces of this upstream submitted committed to Linus's tree.
Changed in linux (Ubuntu): | |
assignee: | nobody → Canonical Kernel Team (canonical-kernel-team) |
status: | Confirmed → Triaged |
tags: | added: kernel-da-key kernel-hyper-v xenial |
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
summary: |
- [Hyper-V] VM Sockets + [Hyper-V] Hyper-V Sockets |
This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:
apport-collect 1541585
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.