Merge pull request #1432 from rneugeba/patchup

Update kernels to 4.4.58/4.9.19/4.10.7 plus add VMBus patches
This commit is contained in:
Rolf Neugebauer 2017-03-31 13:30:18 +01:00 committed by GitHub
commit 4ebcd6ff61
64 changed files with 671 additions and 172 deletions

View File

@ -72,12 +72,12 @@ Again, resolve any conflicts as described above.
# Adding/Removing patches
If you want to add or remove patches make sure you have an up-to-date branch with the currently applied patches (see above). Then either any normal means (`git cherry-pick -x`, `git am`, or `git commit`, etc) to add new patches.
If you want to add or remove patches make sure you have an up-to-date branch with the currently applied patches (see above). Then either any normal means (`git cherry-pick -x`, `git am`, or `git commit`, etc) to add new patches. For cherry-picked patches also please add a `Origin:` line after the DCO lines with a reference the git tree the patch was cherry-picked from.
If the patch is not cherry-picked from a standard Linux tree (like
newer stable branches, `linux-next`, `net-next`, Linus' tree) try to
include as much information in the commit message as possible as to
where the patch originated from. The canonical form would be to add a `Origin:` line after the DCO lines, e.g.:
If the patch is not cherry-picked try to include as much information
in the commit message as possible as to where the patch originated
from. The canonical form would be to add a `Origin:` line after the
DCO lines, e.g.:
```
Origin: https://patchwork.ozlabs.org/patch/622404/
```

View File

@ -19,18 +19,18 @@ all: bzImage tag
#
# IMAGE_VERSION is used to determine if a new image should be pushed to hub.
ifeq ($(KERNEL),v4.4)
KERNEL_VERSION=4.4.57
KERNEL_VERSION=4.4.58
IMAGE_VERSION=$(KERNEL_VERSION)-0
IMAGE_MAJOR_VERSION=4.4.x
DEPS=Dockerfile.4.4 Makefile kernel_config kernel_config.debug kernel_config.4.4 patches-4.4
else
ifeq ($(KERNEL),v4.10)
KERNEL_VERSION=4.10.6
KERNEL_VERSION=4.10.7
IMAGE_VERSION=$(KERNEL_VERSION)-0
IMAGE_MAJOR_VERSION=4.10.x
DEPS=Dockerfile.4.10 Makefile kernel_config kernel_config.debug patches-4.10
else
KERNEL_VERSION=4.9.18
KERNEL_VERSION=4.9.19
IMAGE_VERSION=$(KERNEL_VERSION)-0
IMAGE_MAJOR_VERSION=4.9.x
DEPS=Dockerfile Makefile kernel_config kernel_config.debug patches-4.9

View File

@ -1,7 +1,7 @@
From 3be38bf120ec1165e991ed223b1f64f8105ab76e Mon Sep 17 00:00:00 2001
From f8892ad868fdcd96ccf6edc93ed61d8a97af88e4 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Thu, 21 Jul 2016 16:04:38 -0600
Subject: [PATCH 1/4] hv_sock: introduce Hyper-V Sockets
Subject: [PATCH 1/6] hv_sock: introduce Hyper-V Sockets
Hyper-V Sockets (hv_sock) supplies a byte-stream based communication
mechanism between the host and the guest. It's somewhat like TCP over
@ -22,6 +22,7 @@ Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Cathy Avery <cavery@redhat.com>
Origin: git@github.com:dcui/linux.git
(cherry picked from commit 8c902827bfd9c5d47ecbfbe7687e001b74de3930)
---
MAINTAINERS | 2 +

View File

@ -1,7 +1,7 @@
From 350d124854fcb5ecfe9347fb4b893d27d6b6660e Mon Sep 17 00:00:00 2001
From 268b402c42c140328224ff994d1d76053f3113f9 Mon Sep 17 00:00:00 2001
From: Alex Ng <alexng@messages.microsoft.com>
Date: Sat, 28 Jan 2017 12:37:17 -0700
Subject: [PATCH 2/4] Drivers: hv: vmbus: Use all supported IC versions to
Subject: [PATCH 2/6] Drivers: hv: vmbus: Use all supported IC versions to
negotiate
Previously, we were assuming that each IC protocol version was tied to a
@ -22,6 +22,7 @@ Reported-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Signed-off-by: Alex Ng <alexng@messages.microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
(cherry picked from commit a1656454131880980bc3a5313c8bf66ef5990c91)
---
drivers/hv/channel_mgmt.c | 80 +++++++++++++++++++++++++++-------------
@ -33,7 +34,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 files changed, 154 insertions(+), 106 deletions(-)
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 0af7e39006c8..b42d69c05ebb 100644
index a58cd102af1b..feca5d2e7b25 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -203,33 +203,34 @@ static u16 hv_get_dev_type(const struct vmbus_channel *channel)

View File

@ -1,13 +1,14 @@
From 15a8be4e26e2ab23e2bff953aed060f0cb5fab39 Mon Sep 17 00:00:00 2001
From 1dc474194b72f224081c90311887317415f987dc Mon Sep 17 00:00:00 2001
From: Alex Ng <alexng@messages.microsoft.com>
Date: Sat, 28 Jan 2017 12:37:18 -0700
Subject: [PATCH 3/4] Drivers: hv: Log the negotiated IC versions.
Subject: [PATCH 3/6] Drivers: hv: Log the negotiated IC versions.
Log the negotiated IC versions.
Signed-off-by: Alex Ng <alexng@messages.microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
(cherry picked from commit 1274a690f6b2bd2b37447c47e3062afa8aa43f93)
---
drivers/hv/hv_fcopy.c | 9 +++++++--

View File

@ -1,47 +0,0 @@
From be86c6dee392d2f7d4b42b7c191c429ac5e3f263 Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Sun, 12 Mar 2017 20:00:30 -0700
Subject: [PATCH 4/4] Drivers: hv: vmbus: Don't leak memory when a channel is
rescinded
When we close a channel that has been rescinded, we will leak memory since
vmbus_teardown_gpadl() returns an error. Fix this so that we can properly
cleanup the memory allocated to the ring buffers.
Fixes: ccb61f8a99e6 ("Drivers: hv: vmbus: Fix a rescind handling bug")
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 5e030d5ce9d99a899b648413139ff65bab12b038)
---
drivers/hv/channel.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index be34547cdb68..1606e7f08f4b 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -506,12 +506,15 @@ int vmbus_teardown_gpadl(struct vmbus_channel *channel, u32 gpadl_handle)
wait_for_completion(&info->waitevent);
- if (channel->rescind) {
- ret = -ENODEV;
- goto post_msg_err;
- }
-
post_msg_err:
+ /*
+ * If the channel has been rescinded;
+ * we will be awakened by the rescind
+ * handler; set the error code to zero so we don't leak memory.
+ */
+ if (channel->rescind)
+ ret = 0;
+
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_del(&info->msglistentry);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
--
2.11.0

View File

@ -0,0 +1,56 @@
From 686f341e764920ada0163bedf354924250ed32d8 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Sun, 26 Mar 2017 16:42:20 +0800
Subject: [PATCH 4/6] vmbus: fix missed ring events on boot
During initialization, the channel initialization code schedules the
tasklet to scan the VMBUS receive event page (i.e. simulates an
interrupt). The problem was that it invokes the tasklet on a different
CPU from where it normally runs and therefore if an event is present,
it will clear the bit but not find the associated channel.
This can lead to missed events, typically stuck tasks, during bootup
when sub channels are being initialized. Typically seen as stuck
boot with 8 or more CPU's.
This patch is not necessary for upstream (4.11 and later) since
commit 631e63a9f346 ("vmbus: change to per channel tasklet").
This changed vmbus code to get rid of common tasklet which
caused the problem.
Cc: stable@vger.kernel.org
Fixes: 638fea33aee8 ("Drivers: hv: vmbus: fix the race when querying & updating the percpu list")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Origin: git@github.com:dcui/linux.git
(cherry picked from commit 5cf3a72a111cecc7da759542c56560ce509159d7)
---
drivers/hv/channel_mgmt.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index feca5d2e7b25..3fda63bf60ab 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -389,8 +389,17 @@ void hv_event_tasklet_enable(struct vmbus_channel *channel)
tasklet = hv_context.event_dpc[channel->target_cpu];
tasklet_enable(tasklet);
- /* In case there is any pending event */
- tasklet_schedule(tasklet);
+ /*
+ * In case there is any pending event schedule a rescan
+ * but must be on the correct CPU for the channel.
+ */
+ if (channel->target_cpu == get_cpu())
+ tasklet_schedule(tasklet);
+ else
+ smp_call_function_single(channel->target_cpu,
+ (smp_call_func_t)tasklet_schedule,
+ tasklet, false);
+ put_cpu();
}
void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid)
--
2.11.0

View File

@ -0,0 +1,59 @@
From e3de49b1a6a80b33f792caf62cc33048dcbaed91 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 29 Mar 2017 18:37:10 +0800
Subject: [PATCH 5/6] vmbus: remove "goto error_clean_msglist" in vmbus_open()
This is just a cleanup patch to simplify the code a little.
No semantic change.
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Origin: git@github.com:dcui/linux.git
(cherry picked from commit 2c89f21cbdfd39299482cd6068094097a45f13b3)
---
drivers/hv/channel.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 1606e7f08f4b..1caed01954f6 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -184,17 +184,18 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
ret = vmbus_post_msg(open_msg,
sizeof(struct vmbus_channel_open_channel), true);
- if (ret != 0) {
- err = ret;
- goto error_clean_msglist;
- }
-
- wait_for_completion(&open_info->waitevent);
+ if (ret == 0)
+ wait_for_completion(&open_info->waitevent);
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_del(&open_info->msglistentry);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
+ if (ret != 0) {
+ err = ret;
+ goto error_free_gpadl;
+ }
+
if (newchannel->rescind) {
err = -ENODEV;
goto error_free_gpadl;
@@ -209,11 +210,6 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
kfree(open_info);
return 0;
-error_clean_msglist:
- spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
- list_del(&open_info->msglistentry);
- spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
-
error_free_gpadl:
vmbus_teardown_gpadl(newchannel, newchannel->ringbuffer_gpadlhandle);
kfree(open_info);
--
2.11.0

View File

@ -0,0 +1,177 @@
From e609da809e493b72eb28c0ad215edea8ddf54fb5 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Fri, 24 Mar 2017 20:53:18 +0800
Subject: [PATCH 6/6] vmbus: dynamically enqueue/dequeue the channel on
vmbus_open/close
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Origin: git@github.com:dcui/linux.git
(cherry picked from commit bee4910daa4aed57ce60d2e2350e3cc120c383ca)
---
drivers/hv/channel.c | 16 ++++++++++---
drivers/hv/channel_mgmt.c | 58 ++++++++++++++++++++---------------------------
include/linux/hyperv.h | 3 +++
3 files changed, 40 insertions(+), 37 deletions(-)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 1caed01954f6..5bbcc964dbf7 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -181,6 +181,10 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
&vmbus_connection.chn_msg_list);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
+ hv_event_tasklet_disable(newchannel);
+ hv_percpu_channel_enq(newchannel);
+ hv_event_tasklet_enable(newchannel);
+
ret = vmbus_post_msg(open_msg,
sizeof(struct vmbus_channel_open_channel), true);
@@ -193,23 +197,27 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
if (ret != 0) {
err = ret;
- goto error_free_gpadl;
+ goto error_deq_channel;
}
if (newchannel->rescind) {
err = -ENODEV;
- goto error_free_gpadl;
+ goto error_deq_channel;
}
if (open_info->response.open_result.status) {
err = -EAGAIN;
- goto error_free_gpadl;
+ goto error_deq_channel;
}
newchannel->state = CHANNEL_OPENED_STATE;
kfree(open_info);
return 0;
+error_deq_channel:
+ hv_event_tasklet_disable(newchannel);
+ hv_percpu_channel_deq(newchannel);
+ hv_event_tasklet_enable(newchannel);
error_free_gpadl:
vmbus_teardown_gpadl(newchannel, newchannel->ringbuffer_gpadlhandle);
kfree(open_info);
@@ -555,6 +563,8 @@ static int vmbus_close_internal(struct vmbus_channel *channel)
goto out;
}
+ hv_percpu_channel_deq(channel);
+
channel->state = CHANNEL_OPEN_STATE;
channel->sc_creation_callback = NULL;
/* Stop callback and cancel the timer asap */
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 3fda63bf60ab..e2fbfa290f1c 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -376,6 +376,30 @@ static void vmbus_release_relid(u32 relid)
true);
}
+void hv_percpu_channel_enq(struct vmbus_channel *channel)
+{
+ if (channel->target_cpu != get_cpu())
+ smp_call_function_single(channel->target_cpu,
+ percpu_channel_enq,
+ channel, true);
+ else
+ percpu_channel_enq(channel);
+ put_cpu();
+
+}
+
+void hv_percpu_channel_deq(struct vmbus_channel *channel)
+{
+ if (channel->target_cpu != get_cpu())
+ smp_call_function_single(channel->target_cpu,
+ percpu_channel_deq,
+ channel, true);
+ else
+ percpu_channel_deq(channel);
+ put_cpu();
+
+}
+
void hv_event_tasklet_disable(struct vmbus_channel *channel)
{
struct tasklet_struct *tasklet;
@@ -410,17 +434,6 @@ void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid)
BUG_ON(!channel->rescind);
BUG_ON(!mutex_is_locked(&vmbus_connection.channel_mutex));
- hv_event_tasklet_disable(channel);
- if (channel->target_cpu != get_cpu()) {
- put_cpu();
- smp_call_function_single(channel->target_cpu,
- percpu_channel_deq, channel, true);
- } else {
- percpu_channel_deq(channel);
- put_cpu();
- }
- hv_event_tasklet_enable(channel);
-
if (channel->primary_channel == NULL) {
list_del(&channel->listentry);
@@ -513,18 +526,6 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel)
init_vp_index(newchannel, dev_type);
- hv_event_tasklet_disable(newchannel);
- if (newchannel->target_cpu != get_cpu()) {
- put_cpu();
- smp_call_function_single(newchannel->target_cpu,
- percpu_channel_enq,
- newchannel, true);
- } else {
- percpu_channel_enq(newchannel);
- put_cpu();
- }
- hv_event_tasklet_enable(newchannel);
-
/*
* This state is used to indicate a successful open
* so that when we do close the channel normally, we
@@ -573,17 +574,6 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel)
list_del(&newchannel->listentry);
mutex_unlock(&vmbus_connection.channel_mutex);
- hv_event_tasklet_disable(newchannel);
- if (newchannel->target_cpu != get_cpu()) {
- put_cpu();
- smp_call_function_single(newchannel->target_cpu,
- percpu_channel_deq, newchannel, true);
- } else {
- percpu_channel_deq(newchannel);
- put_cpu();
- }
- hv_event_tasklet_enable(newchannel);
-
vmbus_release_relid(newchannel->offermsg.child_relid);
err_free_chan:
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 41e5ed87f833..0792d16f4b3e 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -1467,6 +1467,9 @@ extern bool vmbus_prep_negotiate_resp(struct icmsg_hdr *icmsghdrp, u8 *buf,
void hv_event_tasklet_disable(struct vmbus_channel *channel);
void hv_event_tasklet_enable(struct vmbus_channel *channel);
+void hv_percpu_channel_enq(struct vmbus_channel *channel);
+void hv_percpu_channel_deq(struct vmbus_channel *channel);
+
void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid);
void vmbus_setevent(struct vmbus_channel *channel);
--
2.11.0

View File

@ -1,4 +1,4 @@
From f609cbcf7e261fecf0285dafe9960de7bc946ba2 Mon Sep 17 00:00:00 2001
From e6c41b6c46816d22a502e998dc85c97613510652 Mon Sep 17 00:00:00 2001
From: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu, 17 Dec 2015 16:53:43 +0800
Subject: [PATCH 01/44] virtio: make find_vqs() checkpatch.pl-friendly

View File

@ -1,4 +1,4 @@
From 47fddf67540bce994ef48320af50780069a4487a Mon Sep 17 00:00:00 2001
From 7dbbed8d7baabd34ddc5207a9d7d07516715df3f Mon Sep 17 00:00:00 2001
From: Julia Lawall <julia.lawall@lip6.fr>
Date: Sat, 21 Nov 2015 18:39:17 +0100
Subject: [PATCH 02/44] VSOCK: constify vmci_transport_notify_ops structures

View File

@ -1,4 +1,4 @@
From 71330f083c95bf08f9003dde832336a1fe59332c Mon Sep 17 00:00:00 2001
From fbb2959723e8650757156863abdab49dc3b70b97 Mon Sep 17 00:00:00 2001
From: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Date: Tue, 22 Mar 2016 17:05:52 +0100
Subject: [PATCH 03/44] AF_VSOCK: Shrink the area influenced by prepare_to_wait

View File

@ -1,4 +1,4 @@
From 5258b00ab6d2cc6180ac1c8d938b0f949fa3a70c Mon Sep 17 00:00:00 2001
From f4d71c373f925899ea9b11f2dd98e1294aac92c7 Mon Sep 17 00:00:00 2001
From: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu, 23 Jun 2016 16:28:58 +0100
Subject: [PATCH 04/44] vsock: make listener child lock ordering explicit

View File

@ -1,4 +1,4 @@
From 0a646670d90865b154390820c6150ec72e0f4fca Mon Sep 17 00:00:00 2001
From 4f88a2171686507500661c6b403dacbbee0bc79d Mon Sep 17 00:00:00 2001
From: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu, 28 Jul 2016 15:36:30 +0100
Subject: [PATCH 05/44] VSOCK: transport-specific vsock_transport functions

View File

@ -1,4 +1,4 @@
From 96ec12e1052d002eb024d19e016682729e3cc8cf Mon Sep 17 00:00:00 2001
From 8a8beec90402b31271e908d41fca767798e81676 Mon Sep 17 00:00:00 2001
From: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu, 28 Jul 2016 15:36:31 +0100
Subject: [PATCH 06/44] VSOCK: defer sock removal to transports

View File

@ -1,4 +1,4 @@
From 8fbd614bbb155c91ef7b420b2a654ef8c53d67e0 Mon Sep 17 00:00:00 2001
From cc11a7e2ae0dc124da2a93bd551463d046a387ac Mon Sep 17 00:00:00 2001
From: Asias He <asias@redhat.com>
Date: Thu, 28 Jul 2016 15:36:32 +0100
Subject: [PATCH 07/44] VSOCK: Introduce virtio_vsock_common.ko

View File

@ -1,4 +1,4 @@
From bc950a7d03d15e59bac430c0a77e7418db614bd8 Mon Sep 17 00:00:00 2001
From 7f2ef8f638c728daa7df588225fa117d87cfefde Mon Sep 17 00:00:00 2001
From: Asias He <asias@redhat.com>
Date: Thu, 28 Jul 2016 15:36:33 +0100
Subject: [PATCH 08/44] VSOCK: Introduce virtio_transport.ko

View File

@ -1,4 +1,4 @@
From 8c891d7e147e4515c22b67216776a05cd232f638 Mon Sep 17 00:00:00 2001
From a0b0f3bdf891086e680940b1742590acd08eb38c Mon Sep 17 00:00:00 2001
From: Asias He <asias@redhat.com>
Date: Thu, 28 Jul 2016 15:36:34 +0100
Subject: [PATCH 09/44] VSOCK: Introduce vhost_vsock.ko

View File

@ -1,4 +1,4 @@
From 6fb88b14e8b096eb0c6d490eaafabff87fa40d69 Mon Sep 17 00:00:00 2001
From 1c2fe7a0a54f2320241299844362b568b09e4122 Mon Sep 17 00:00:00 2001
From: Asias He <asias@redhat.com>
Date: Thu, 28 Jul 2016 15:36:35 +0100
Subject: [PATCH 10/44] VSOCK: Add Makefile and Kconfig

View File

@ -1,4 +1,4 @@
From 39f091319312580b581a4f64de76c73466dd20e2 Mon Sep 17 00:00:00 2001
From 38db62c5e7dee857ff2d33125b3c0cf542cded7f Mon Sep 17 00:00:00 2001
From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Tue, 2 Aug 2016 13:50:42 +0000
Subject: [PATCH 11/44] VSOCK: Use kvfree()

View File

@ -1,4 +1,4 @@
From ad5fde73d72766b69445ef6b94740912b962542b Mon Sep 17 00:00:00 2001
From 80f2ceccf81bfc3ece1626d2a8cb379aebdd5244 Mon Sep 17 00:00:00 2001
From: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu, 4 Aug 2016 14:52:53 +0100
Subject: [PATCH 12/44] vhost/vsock: fix vhost virtio_vsock_pkt use-after-free

View File

@ -1,4 +1,4 @@
From 8c5b0e95393280c29bda5c87f921470dee326829 Mon Sep 17 00:00:00 2001
From 7f6324aea12837bd07ea5de449e1b5ca5d5365de Mon Sep 17 00:00:00 2001
From: Stefan Hajnoczi <stefanha@redhat.com>
Date: Fri, 5 Aug 2016 13:52:09 +0100
Subject: [PATCH 13/44] virtio-vsock: fix include guard typo

View File

@ -1,4 +1,4 @@
From b62b8ac0df932a45659e98a0072f53a281fde234 Mon Sep 17 00:00:00 2001
From 5417fd5be01b316be0071767311067c641d6a822 Mon Sep 17 00:00:00 2001
From: Gerard Garcia <ggarcia@deic.uab.cat>
Date: Wed, 10 Aug 2016 17:24:34 +0200
Subject: [PATCH 14/44] vhost/vsock: drop space available check for TX vq

View File

@ -1,4 +1,4 @@
From c6a4cf264d47cca0609ae25bc53fe9659fa74759 Mon Sep 17 00:00:00 2001
From 94de69da89c2365d359a7e948b71ee5cfb4898f9 Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@docker.com>
Date: Mon, 4 Apr 2016 14:50:10 +0100
Subject: [PATCH 15/44] VSOCK: Only allow host network namespace to use

View File

@ -1,4 +1,4 @@
From e79159e1fe83564499dcdf8b3246c6c8021f8f44 Mon Sep 17 00:00:00 2001
From 15b01147e41ae62c7698990b60a80da27d8d9bc6 Mon Sep 17 00:00:00 2001
From: Jake Oshins <jakeo@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:41 -0800
Subject: [PATCH 16/44] drivers:hv: Define the channel type for Hyper-V PCI

View File

@ -1,4 +1,4 @@
From d3203316d4990cbfed4d9fa6849c82f6bf17698e Mon Sep 17 00:00:00 2001
From 323a1c2b080a944c967cd6048909037834ea6cb6 Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:43 -0800
Subject: [PATCH 17/44] Drivers: hv: vmbus: Use uuid_le type consistently

View File

@ -1,4 +1,4 @@
From 660faacaab63072bd6cce85a15b9f12172e957d6 Mon Sep 17 00:00:00 2001
From 64e19146cdc8e5af07e5fd2a7e881a74d2cf4d03 Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:44 -0800
Subject: [PATCH 18/44] Drivers: hv: vmbus: Use uuid_le_cmp() for comparing

View File

@ -1,4 +1,4 @@
From 0d08fd09131b9376891a20832cb032b57eb0b7e4 Mon Sep 17 00:00:00 2001
From 3d59990858b390f17f3e92084d4bd500faf74ec1 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:48 -0800
Subject: [PATCH 19/44] Drivers: hv: vmbus: do sanity check of channel state in

View File

@ -1,4 +1,4 @@
From 4a11c27e225efac7b5c83293b35b491e6fc206fa Mon Sep 17 00:00:00 2001
From 62e289eb22c3217cbea5ee66bdf32ad865e541aa Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:50 -0800
Subject: [PATCH 20/44] Drivers: hv: vmbus: release relid on error in

View File

@ -1,4 +1,4 @@
From 8fd76670d0030231caf284661cd41b31f50919aa Mon Sep 17 00:00:00 2001
From 0554553d75d339e5e159b08a846b9a791ad0e02f Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:51 -0800
Subject: [PATCH 21/44] Drivers: hv: vmbus: channge

View File

@ -1,4 +1,4 @@
From 7f5f3108931dd156d30f6aa01b1828be2996c4f6 Mon Sep 17 00:00:00 2001
From 0476f778ff5f8a41dd47014b8b6d7f1c84e1bffc Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Mon, 14 Dec 2015 19:02:00 -0800
Subject: [PATCH 22/44] Drivers: hv: remove code duplication between

View File

@ -1,4 +1,4 @@
From 78aba226343625e407c1e35b0a8d8872cfa689d1 Mon Sep 17 00:00:00 2001
From f54038d47e136a948e86c0d4591ea9beda4074d4 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 21 Dec 2015 12:21:22 -0800
Subject: [PATCH 23/44] Drivers: hv: vmbus: fix the building warning with

View File

@ -1,4 +1,4 @@
From cc4d402849a6594f8939795f2ee25ed490481f19 Mon Sep 17 00:00:00 2001
From 1883a7b53669ce799df3fe88a0b356558f2f28cf Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Tue, 15 Dec 2015 16:27:27 -0800
Subject: [PATCH 24/44] Drivers: hv: vmbus: Treat Fibre Channel devices as

View File

@ -1,4 +1,4 @@
From 0ffbed6c39e20d8871354ada8d71acbea5436de8 Mon Sep 17 00:00:00 2001
From 179386708a6b002928f78b743aea4dab8bcfccc3 Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Fri, 25 Dec 2015 20:00:30 -0800
Subject: [PATCH 25/44] Drivers: hv: vmbus: Add vendor and device atttributes

View File

@ -1,4 +1,4 @@
From dde5ae12edb1fe8eafc8149c588663f2c4467392 Mon Sep 17 00:00:00 2001
From a4b2dcb94d291db84ba87df47190dc4d161b5fc8 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:37 -0800
Subject: [PATCH 26/44] Drivers: hv: vmbus: add a helper function to set a

View File

@ -1,4 +1,4 @@
From 395b20806a2c2df902dcb7413d4c47ff70bd8a18 Mon Sep 17 00:00:00 2001
From 8c8e6ed70717ff34dc591c42fb9cfc8a27e9b3f5 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:38 -0800
Subject: [PATCH 27/44] Drivers: hv: vmbus: define the new offer type for

View File

@ -1,4 +1,4 @@
From a81d89d49e989e620b801d19c21f1fa793c506b3 Mon Sep 17 00:00:00 2001
From 67412c57376529169173595ffac6fd848ed58035 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:39 -0800
Subject: [PATCH 28/44] Drivers: hv: vmbus: vmbus_sendpacket_ctl: hvsock: avoid

View File

@ -1,4 +1,4 @@
From 95be5eb3975f43a75f80b9414387c90b296cc82a Mon Sep 17 00:00:00 2001
From 061ef00724d38f9c073064fc6b4ae57f599edfc5 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:40 -0800
Subject: [PATCH 29/44] Drivers: hv: vmbus: define a new VMBus message type for

View File

@ -1,4 +1,4 @@
From 9c4c8be9ef0fb7bd67145dade8082754b686b8d0 Mon Sep 17 00:00:00 2001
From 4db1fe1f55bb82c474faa0f721b5bdc3dfe0cd57 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:41 -0800
Subject: [PATCH 30/44] Drivers: hv: vmbus: add a hvsock flag in struct

View File

@ -1,4 +1,4 @@
From 109111b9519f6c6128da5115e24e18410e69f1a2 Mon Sep 17 00:00:00 2001
From 3dfea6738dedebff57eb3b7a532a9cd42d193360 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:42 -0800
Subject: [PATCH 31/44] Drivers: hv: vmbus: add a per-channel rescind callback

View File

@ -1,4 +1,4 @@
From 08f9e7c593d157ce4dc03c2a4856fd84971a7cbd Mon Sep 17 00:00:00 2001
From a7a847f0fe2023408ccdec4ab17d362ce588007c Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:43 -0800
Subject: [PATCH 32/44] Drivers: hv: vmbus: add an API

View File

@ -1,4 +1,4 @@
From 6cf4900b125efa655cac0855f71caaf37d129087 Mon Sep 17 00:00:00 2001
From f3ede00d134158654bf4c42aa07299892baacac4 Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:45 -0800
Subject: [PATCH 33/44] Drivers: hv: vmbus: Give control over how the ring

View File

@ -1,4 +1,4 @@
From 8c1531920129543abc16064dfa975e0c43479ac1 Mon Sep 17 00:00:00 2001
From 0ac65eb964a6a6a659a72c38a3145941eda499e7 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Fri, 26 Feb 2016 15:13:16 -0800
Subject: [PATCH 34/44] Drivers: hv: vmbus: avoid wait_for_completion() on

View File

@ -1,4 +1,4 @@
From 297cc0460b13aaafefa3b36f59b34f554a94a273 Mon Sep 17 00:00:00 2001
From 0a5949c41fa0979c613626cc295ba628082ed487 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Fri, 26 Feb 2016 15:13:18 -0800
Subject: [PATCH 35/44] Drivers: hv: vmbus: avoid unneeded compiler

View File

@ -1,4 +1,4 @@
From a0c7198f3417369926962219c6b7a15b6bd4bc2e Mon Sep 17 00:00:00 2001
From 709d44d11caec69f73fdeaf9835ca18885d846da Mon Sep 17 00:00:00 2001
From: Tom Herbert <tom@herbertland.com>
Date: Mon, 7 Mar 2016 14:11:06 -0800
Subject: [PATCH 36/44] kcm: Kernel Connection Multiplexor module

View File

@ -1,4 +1,4 @@
From 5e39f91f019412407ed0e28f7f0a7502d7883258 Mon Sep 17 00:00:00 2001
From 4c0016aad9295d0096315519c0ade153731ed314 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 21 Mar 2016 02:51:09 -0700
Subject: [PATCH 37/44] net: add the AF_KCM entries to family name tables
@ -14,7 +14,7 @@ Origin: https://patchwork.ozlabs.org/patch/600006
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index f4c0917e66b5..ba24aeb6999c 100644
index 9c708a5fb751..36afa5d4598b 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -263,7 +263,8 @@ static const char *const af_family_key_strings[AF_MAX+1] = {

View File

@ -1,4 +1,4 @@
From c95c1bb451b392a6c6917b6140f0ec5b943c2523 Mon Sep 17 00:00:00 2001
From e894e87f386637462f82582fd28d71f2be3a2213 Mon Sep 17 00:00:00 2001
From: Courtney Cavin <courtney.cavin@sonymobile.com>
Date: Wed, 27 Apr 2016 12:13:03 -0700
Subject: [PATCH 38/44] net: Add Qualcomm IPC router

View File

@ -1,4 +1,4 @@
From 51ea1e21ce9aeefabac1c60545df6facbff79073 Mon Sep 17 00:00:00 2001
From e00605a4b71e1d3bfeb45ff1dc5ac6c68d079cfb Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Sun, 15 May 2016 09:53:11 -0700
Subject: [PATCH 39/44] hv_sock: introduce Hyper-V Sockets

View File

@ -1,4 +1,4 @@
From b4376d9a14b091c9db022998d31f57d419836293 Mon Sep 17 00:00:00 2001
From 7e5f6c44e05bb8f757ef546b55e32b750bee2ba9 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 21 Mar 2016 02:53:08 -0700
Subject: [PATCH 40/44] net: add the AF_HYPERV entries to family name tables
@ -14,7 +14,7 @@ Origin: https://patchwork.ozlabs.org/patch/600009
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index ba24aeb6999c..c75ebeec3290 100644
index 36afa5d4598b..5077059e352b 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -264,7 +264,7 @@ static const char *const af_family_key_strings[AF_MAX+1] = {

View File

@ -1,4 +1,4 @@
From 773bb65bd15a0be1de10b24abd7574921aae3d37 Mon Sep 17 00:00:00 2001
From 0a66e4e4bad73310b72191221473400a6fb583de Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Sat, 21 May 2016 16:55:50 +0800
Subject: [PATCH 41/44] Drivers: hv: vmbus: fix the race when querying &

View File

@ -1,4 +1,4 @@
From f2c5c2999fbeed4c04ac054273e86626e1626f23 Mon Sep 17 00:00:00 2001
From f3fe4f74930c79446965f030181c151209d720bc Mon Sep 17 00:00:00 2001
From: Rolf Neugebauer <rolf.neugebauer@gmail.com>
Date: Mon, 23 May 2016 18:55:45 +0100
Subject: [PATCH 42/44] vmbus: Don't spam the logs with unknown GUIDs

View File

@ -1,4 +1,4 @@
From 5fc2cf4e57f189396851d1954af1b502ab9da55c Mon Sep 17 00:00:00 2001
From 4f3ad45e7292ab9bacb11f872f10019829ed75a4 Mon Sep 17 00:00:00 2001
From: James Bottomley <James.Bottomley@HansenPartnership.com>
Date: Wed, 17 Feb 2016 16:49:38 -0800
Subject: [PATCH 43/44] fs: add filp_clone_open API

View File

@ -1,4 +1,4 @@
From 680928026b4253ea4df25a932ca10198aa440ab6 Mon Sep 17 00:00:00 2001
From cbc6fd69ae20926da84358ee8529184379da259c Mon Sep 17 00:00:00 2001
From: James Bottomley <James.Bottomley@HansenPartnership.com>
Date: Wed, 17 Feb 2016 16:51:16 -0800
Subject: [PATCH 44/44] binfmt_misc: add persistent opened binary handler for

View File

@ -1,7 +1,7 @@
From fb994fc98cd8e945230494ba2750b93805dc2a88 Mon Sep 17 00:00:00 2001
From 687435d249d10985e1c6d6d6cc143e8004e8b976 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Sat, 23 Jul 2016 01:35:51 +0000
Subject: [PATCH 1/8] hv_sock: introduce Hyper-V Sockets
Subject: [PATCH 01/10] hv_sock: introduce Hyper-V Sockets
Hyper-V Sockets (hv_sock) supplies a byte-stream based communication
mechanism between the host and the guest. It's somewhat like TCP over

View File

@ -1,7 +1,7 @@
From 1bca2f8a8059291f0b3f24f11694eafafb413886 Mon Sep 17 00:00:00 2001
From 554ba8b0c4d9aa719d239b2f97eb59075c6c33d9 Mon Sep 17 00:00:00 2001
From: Rolf Neugebauer <rolf.neugebauer@gmail.com>
Date: Mon, 23 May 2016 18:55:45 +0100
Subject: [PATCH 2/8] vmbus: Don't spam the logs with unknown GUIDs
Subject: [PATCH 02/10] vmbus: Don't spam the logs with unknown GUIDs
With Hyper-V sockets device types are introduced on the fly. The pr_info()
then prints a message on every connection, which is way too verbose. Since
@ -14,7 +14,7 @@ Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
1 file changed, 1 deletion(-)
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index cb9531541a12..eec03051da78 100644
index d8bc4b910192..8df02f3ca0b2 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -192,7 +192,6 @@ static u16 hv_get_dev_type(const struct vmbus_channel *channel)

View File

@ -1,8 +1,8 @@
From 9db0219d4a8338b91da3a57e61b0238412980596 Mon Sep 17 00:00:00 2001
From a9c848779876b7b98a6c588494cd20010894fbf1 Mon Sep 17 00:00:00 2001
From: Alex Ng <alexng@messages.microsoft.com>
Date: Sun, 6 Nov 2016 13:14:07 -0800
Subject: [PATCH 3/8] Drivers: hv: utils: Fix the mapping between host version
and protocol to use
Subject: [PATCH 03/10] Drivers: hv: utils: Fix the mapping between host
version and protocol to use
We should intentionally declare the protocols to use for every known host
and default to using the latest protocol if the host is unknown or new.
@ -10,6 +10,7 @@ and default to using the latest protocol if the host is unknown or new.
Signed-off-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
(cherry picked from commit 3da0401b4d0e17aea7526db0235d98fa535d903e)
---
drivers/hv/hv_util.c | 9 ++++++---

View File

@ -1,7 +1,7 @@
From c3e4ab7b456d60a2672cbad46ba0ca31b18ff03b Mon Sep 17 00:00:00 2001
From ccab2062a98a38bd5ff2d57e184229345ff057ff Mon Sep 17 00:00:00 2001
From: Alex Ng <alexng@messages.microsoft.com>
Date: Sun, 6 Nov 2016 13:14:10 -0800
Subject: [PATCH 4/8] Drivers: hv: vss: Improve log messages.
Subject: [PATCH 04/10] Drivers: hv: vss: Improve log messages.
Adding log messages to help troubleshoot error cases and transaction
handling.
@ -9,6 +9,7 @@ handling.
Signed-off-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
(cherry picked from commit 23d2cc0c29eb0e7c6fe4cac88098306c31c40208)
---
drivers/hv/hv_snapshot.c | 25 +++++++++++++++++++------

View File

@ -1,7 +1,7 @@
From dc9e5688dad32ec5874c767b6660665d014a1e45 Mon Sep 17 00:00:00 2001
From d303deabd611b45b7574015c06ad2d7408235e77 Mon Sep 17 00:00:00 2001
From: Alex Ng <alexng@messages.microsoft.com>
Date: Sun, 6 Nov 2016 13:14:11 -0800
Subject: [PATCH 5/8] Drivers: hv: vss: Operation timeouts should match host
Subject: [PATCH 05/10] Drivers: hv: vss: Operation timeouts should match host
expectation
Increase the timeout of backup operations. When system is under I/O load,
@ -11,6 +11,7 @@ host timeout values more closely.
Signed-off-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
(cherry picked from commit b357fd3908c1191f2f56e38aa77f2aecdae18bc8)
---
drivers/hv/hv_snapshot.c | 8 ++++++--

View File

@ -1,7 +1,7 @@
From 0fd2ca415da1435d5fee3fab638bd5fdc2e1a432 Mon Sep 17 00:00:00 2001
From bd8b51edd59a3326bf6457fd939e5503ff3f8efb Mon Sep 17 00:00:00 2001
From: Alex Ng <alexng@messages.microsoft.com>
Date: Sat, 28 Jan 2017 12:37:17 -0700
Subject: [PATCH 6/8] Drivers: hv: vmbus: Use all supported IC versions to
Subject: [PATCH 06/10] Drivers: hv: vmbus: Use all supported IC versions to
negotiate
Previously, we were assuming that each IC protocol version was tied to a
@ -22,6 +22,7 @@ Reported-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Signed-off-by: Alex Ng <alexng@messages.microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
(cherry picked from commit a1656454131880980bc3a5313c8bf66ef5990c91)
---
drivers/hv/channel_mgmt.c | 80 +++++++++++++++++++++++++++-------------
@ -33,7 +34,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 files changed, 154 insertions(+), 106 deletions(-)
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index eec03051da78..84c5bc352034 100644
index 8df02f3ca0b2..e7949b64bfbc 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -202,33 +202,34 @@ static u16 hv_get_dev_type(const struct vmbus_channel *channel)

View File

@ -1,13 +1,14 @@
From ae3d3b814fdd28fe77eb7ec2e7b32046d3b11fcb Mon Sep 17 00:00:00 2001
From d692ce39b600298e6c60481d46c284c3c1bf975f Mon Sep 17 00:00:00 2001
From: Alex Ng <alexng@messages.microsoft.com>
Date: Sat, 28 Jan 2017 12:37:18 -0700
Subject: [PATCH 7/8] Drivers: hv: Log the negotiated IC versions.
Subject: [PATCH 07/10] Drivers: hv: Log the negotiated IC versions.
Log the negotiated IC versions.
Signed-off-by: Alex Ng <alexng@messages.microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
(cherry picked from commit 1274a690f6b2bd2b37447c47e3062afa8aa43f93)
---
drivers/hv/hv_fcopy.c | 9 +++++++--

View File

@ -1,47 +0,0 @@
From a8c7a3307f4a4a2cff3cd66ae90aeb45c2cfe017 Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Sun, 12 Mar 2017 20:00:30 -0700
Subject: [PATCH 8/8] Drivers: hv: vmbus: Don't leak memory when a channel is
rescinded
When we close a channel that has been rescinded, we will leak memory since
vmbus_teardown_gpadl() returns an error. Fix this so that we can properly
cleanup the memory allocated to the ring buffers.
Fixes: ccb61f8a99e6 ("Drivers: hv: vmbus: Fix a rescind handling bug")
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 5e030d5ce9d99a899b648413139ff65bab12b038)
---
drivers/hv/channel.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index be34547cdb68..1606e7f08f4b 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -506,12 +506,15 @@ int vmbus_teardown_gpadl(struct vmbus_channel *channel, u32 gpadl_handle)
wait_for_completion(&info->waitevent);
- if (channel->rescind) {
- ret = -ENODEV;
- goto post_msg_err;
- }
-
post_msg_err:
+ /*
+ * If the channel has been rescinded;
+ * we will be awakened by the rescind
+ * handler; set the error code to zero so we don't leak memory.
+ */
+ if (channel->rescind)
+ ret = 0;
+
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_del(&info->msglistentry);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
--
2.11.0

View File

@ -0,0 +1,56 @@
From c68a516460f877753f6617d81455f42911d4bf66 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Sun, 26 Mar 2017 16:42:20 +0800
Subject: [PATCH 08/10] vmbus: fix missed ring events on boot
During initialization, the channel initialization code schedules the
tasklet to scan the VMBUS receive event page (i.e. simulates an
interrupt). The problem was that it invokes the tasklet on a different
CPU from where it normally runs and therefore if an event is present,
it will clear the bit but not find the associated channel.
This can lead to missed events, typically stuck tasks, during bootup
when sub channels are being initialized. Typically seen as stuck
boot with 8 or more CPU's.
This patch is not necessary for upstream (4.11 and later) since
commit 631e63a9f346 ("vmbus: change to per channel tasklet").
This changed vmbus code to get rid of common tasklet which
caused the problem.
Cc: stable@vger.kernel.org
Fixes: 638fea33aee8 ("Drivers: hv: vmbus: fix the race when querying & updating the percpu list")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Origin: git@github.com:dcui/linux.git
(cherry picked from commit 5cf3a72a111cecc7da759542c56560ce509159d7)
---
drivers/hv/channel_mgmt.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index e7949b64bfbc..2fe024e86209 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -388,8 +388,17 @@ void hv_event_tasklet_enable(struct vmbus_channel *channel)
tasklet = hv_context.event_dpc[channel->target_cpu];
tasklet_enable(tasklet);
- /* In case there is any pending event */
- tasklet_schedule(tasklet);
+ /*
+ * In case there is any pending event schedule a rescan
+ * but must be on the correct CPU for the channel.
+ */
+ if (channel->target_cpu == get_cpu())
+ tasklet_schedule(tasklet);
+ else
+ smp_call_function_single(channel->target_cpu,
+ (smp_call_func_t)tasklet_schedule,
+ tasklet, false);
+ put_cpu();
}
void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid)
--
2.11.0

View File

@ -0,0 +1,60 @@
From 55ddc3b37ec5d311e5fff71cacb224d5c87803f3 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 29 Mar 2017 18:37:10 +0800
Subject: [PATCH 09/10] vmbus: remove "goto error_clean_msglist" in
vmbus_open()
This is just a cleanup patch to simplify the code a little.
No semantic change.
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Origin: git@github.com:dcui/linux.git
(cherry picked from commit 2c89f21cbdfd39299482cd6068094097a45f13b3)
---
drivers/hv/channel.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 1606e7f08f4b..1caed01954f6 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -184,17 +184,18 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
ret = vmbus_post_msg(open_msg,
sizeof(struct vmbus_channel_open_channel), true);
- if (ret != 0) {
- err = ret;
- goto error_clean_msglist;
- }
-
- wait_for_completion(&open_info->waitevent);
+ if (ret == 0)
+ wait_for_completion(&open_info->waitevent);
spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_del(&open_info->msglistentry);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
+ if (ret != 0) {
+ err = ret;
+ goto error_free_gpadl;
+ }
+
if (newchannel->rescind) {
err = -ENODEV;
goto error_free_gpadl;
@@ -209,11 +210,6 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
kfree(open_info);
return 0;
-error_clean_msglist:
- spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
- list_del(&open_info->msglistentry);
- spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
-
error_free_gpadl:
vmbus_teardown_gpadl(newchannel, newchannel->ringbuffer_gpadlhandle);
kfree(open_info);
--
2.11.0

View File

@ -0,0 +1,177 @@
From 83ba0bff619dc73f2aa6385ed3e039bb7641550a Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com>
Date: Fri, 24 Mar 2017 20:53:18 +0800
Subject: [PATCH 10/10] vmbus: dynamically enqueue/dequeue the channel on
vmbus_open/close
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Origin: git@github.com:dcui/linux.git
(cherry picked from commit bee4910daa4aed57ce60d2e2350e3cc120c383ca)
---
drivers/hv/channel.c | 16 ++++++++++---
drivers/hv/channel_mgmt.c | 58 ++++++++++++++++++++---------------------------
include/linux/hyperv.h | 3 +++
3 files changed, 40 insertions(+), 37 deletions(-)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 1caed01954f6..5bbcc964dbf7 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -181,6 +181,10 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
&vmbus_connection.chn_msg_list);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
+ hv_event_tasklet_disable(newchannel);
+ hv_percpu_channel_enq(newchannel);
+ hv_event_tasklet_enable(newchannel);
+
ret = vmbus_post_msg(open_msg,
sizeof(struct vmbus_channel_open_channel), true);
@@ -193,23 +197,27 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
if (ret != 0) {
err = ret;
- goto error_free_gpadl;
+ goto error_deq_channel;
}
if (newchannel->rescind) {
err = -ENODEV;
- goto error_free_gpadl;
+ goto error_deq_channel;
}
if (open_info->response.open_result.status) {
err = -EAGAIN;
- goto error_free_gpadl;
+ goto error_deq_channel;
}
newchannel->state = CHANNEL_OPENED_STATE;
kfree(open_info);
return 0;
+error_deq_channel:
+ hv_event_tasklet_disable(newchannel);
+ hv_percpu_channel_deq(newchannel);
+ hv_event_tasklet_enable(newchannel);
error_free_gpadl:
vmbus_teardown_gpadl(newchannel, newchannel->ringbuffer_gpadlhandle);
kfree(open_info);
@@ -555,6 +563,8 @@ static int vmbus_close_internal(struct vmbus_channel *channel)
goto out;
}
+ hv_percpu_channel_deq(channel);
+
channel->state = CHANNEL_OPEN_STATE;
channel->sc_creation_callback = NULL;
/* Stop callback and cancel the timer asap */
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 2fe024e86209..b2bdcfb49144 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -375,6 +375,30 @@ static void vmbus_release_relid(u32 relid)
true);
}
+void hv_percpu_channel_enq(struct vmbus_channel *channel)
+{
+ if (channel->target_cpu != get_cpu())
+ smp_call_function_single(channel->target_cpu,
+ percpu_channel_enq,
+ channel, true);
+ else
+ percpu_channel_enq(channel);
+ put_cpu();
+
+}
+
+void hv_percpu_channel_deq(struct vmbus_channel *channel)
+{
+ if (channel->target_cpu != get_cpu())
+ smp_call_function_single(channel->target_cpu,
+ percpu_channel_deq,
+ channel, true);
+ else
+ percpu_channel_deq(channel);
+ put_cpu();
+
+}
+
void hv_event_tasklet_disable(struct vmbus_channel *channel)
{
struct tasklet_struct *tasklet;
@@ -409,17 +433,6 @@ void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid)
BUG_ON(!channel->rescind);
BUG_ON(!mutex_is_locked(&vmbus_connection.channel_mutex));
- hv_event_tasklet_disable(channel);
- if (channel->target_cpu != get_cpu()) {
- put_cpu();
- smp_call_function_single(channel->target_cpu,
- percpu_channel_deq, channel, true);
- } else {
- percpu_channel_deq(channel);
- put_cpu();
- }
- hv_event_tasklet_enable(channel);
-
if (channel->primary_channel == NULL) {
list_del(&channel->listentry);
@@ -512,18 +525,6 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel)
init_vp_index(newchannel, dev_type);
- hv_event_tasklet_disable(newchannel);
- if (newchannel->target_cpu != get_cpu()) {
- put_cpu();
- smp_call_function_single(newchannel->target_cpu,
- percpu_channel_enq,
- newchannel, true);
- } else {
- percpu_channel_enq(newchannel);
- put_cpu();
- }
- hv_event_tasklet_enable(newchannel);
-
/*
* This state is used to indicate a successful open
* so that when we do close the channel normally, we
@@ -572,17 +573,6 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel)
list_del(&newchannel->listentry);
mutex_unlock(&vmbus_connection.channel_mutex);
- hv_event_tasklet_disable(newchannel);
- if (newchannel->target_cpu != get_cpu()) {
- put_cpu();
- smp_call_function_single(newchannel->target_cpu,
- percpu_channel_deq, newchannel, true);
- } else {
- percpu_channel_deq(newchannel);
- put_cpu();
- }
- hv_event_tasklet_enable(newchannel);
-
vmbus_release_relid(newchannel->offermsg.child_relid);
err_free_chan:
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 956acfc93487..9ee292b28e41 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -1461,6 +1461,9 @@ extern bool vmbus_prep_negotiate_resp(struct icmsg_hdr *icmsghdrp, u8 *buf,
void hv_event_tasklet_disable(struct vmbus_channel *channel);
void hv_event_tasklet_enable(struct vmbus_channel *channel);
+void hv_percpu_channel_enq(struct vmbus_channel *channel);
+void hv_percpu_channel_deq(struct vmbus_channel *channel);
+
void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid);
void vmbus_setevent(struct vmbus_channel *channel);
--
2.11.0