[Hyper-V] hv: vmbus: Fix a host signaling bug
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
High
|
Joseph Salisbury | ||
Trusty |
Fix Released
|
High
|
Joseph Salisbury | ||
Wily |
Fix Released
|
High
|
Joseph Salisbury | ||
Xenial |
Fix Released
|
High
|
Joseph Salisbury | ||
linux-lts-trusty (Ubuntu) |
Fix Released
|
High
|
Joseph Salisbury | ||
Trusty |
Fix Released
|
High
|
Joseph Salisbury |
Bug Description
The following fix has been submitted upstream, but has high enough severity that we would like early inclusion into the Ubuntu kernel. Please consider for wily, vivid, and trusty (and the HWE kernels for the same).
Patch follows:
Currently we have two policies for deciding when to signal the host:
One based on the ring buffer state and the other based on what the VMBUS client driver wants to do. Consider the case when the client wants to explicitly control when to signal the host. In this case, if the client were to defer signaling, we will not be able to signal the host subsequently when the client does want to signal since the ring buffer state will prevent the signaling. Implement logic to have only one signaling policy in force for a given channel.
Signed-off-by: K. Y. Srinivasan <email address hidden>
Reviewed-by: Haiyang Zhang <email address hidden>
Tested-by: Haiyang Zhang <email address hidden>
Cc: <email address hidden> # v4.2+
---
drivers/
include/
2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/drivers/
--- a/drivers/
+++ b/drivers/
@@ -653,10 +653,19 @@ int vmbus_sendpacke
* on the ring. We will not signal if more data is
* to be placed.
*
+ * Based on the channel signal state, we will decide
+ * which signaling policy will be applied.
+ *
* If we cannot write to the ring-buffer; signal the host
* even if we may not have written anything. This is a rare
* enough condition that it should not matter.
*/
+
+ if (channel-
+ signal = true;
+ else
+ kick_q = true;
+
if (((ret == 0) && kick_q && signal) || (ret))
vmbus_
@@ -756,10 +765,19 @@ int vmbus_sendpacke
* on the ring. We will not signal if more data is
* to be placed.
*
+ * Based on the channel signal state, we will decide
+ * which signaling policy will be applied.
+ *
* If we cannot write to the ring-buffer; signal the host
* even if we may not have written anything. This is a rare
* enough condition that it should not matter.
*/
+
+ if (channel-
+ signal = true;
+ else
+ kick_q = true;
+
if (((ret == 0) && kick_q && signal) || (ret))
vmbus_
diff --git a/include/
--- a/include/
+++ b/include/
@@ -756,8 +756,20 @@ struct vmbus_channel {
* link up channels based on their CPU affinity.
*/
struct list_head percpu_list;
+ /*
+ * Host signaling policy: The default policy will be
+ * based on the ring buffer state. We will also support
+ * a policy where the client driver can have explicit
+ * signaling control.
+ */
+ bool signal_state;
};
+static inline void set_channel_
+bool state) {
+ c->signal_state = state;
+}
+
static inline void set_channel_
c->batched_
--
1.7.4.1
summary: |
- [Hyper- + [Hyper-V] hv: vmbus: Fix a host signaling bug |
description: | updated |
Changed in linux (Ubuntu): | |
importance: | Undecided → High |
Changed in linux (Ubuntu Xenial): | |
status: | Confirmed → Triaged |
Changed in linux (Ubuntu Wily): | |
status: | New → Triaged |
Changed in linux (Ubuntu Vivid): | |
status: | New → Triaged |
Changed in linux (Ubuntu Trusty): | |
status: | New → Triaged |
Changed in linux (Ubuntu Wily): | |
importance: | Undecided → High |
Changed in linux (Ubuntu Vivid): | |
importance: | Undecided → High |
Changed in linux (Ubuntu Trusty): | |
importance: | Undecided → High |
assignee: | nobody → Joseph Salisbury (jsalisbury) |
Changed in linux (Ubuntu Vivid): | |
assignee: | nobody → Joseph Salisbury (jsalisbury) |
Changed in linux (Ubuntu Wily): | |
assignee: | nobody → Joseph Salisbury (jsalisbury) |
Changed in linux (Ubuntu Xenial): | |
assignee: | nobody → Joseph Salisbury (jsalisbury) |
tags: | added: kernel-hyper-v trusty vivid wily xenial |
Changed in linux (Ubuntu Xenial): | |
status: | Triaged → In Progress |
Changed in linux (Ubuntu Wily): | |
status: | Triaged → In Progress |
no longer affects: | linux-lts-trusty (Ubuntu Vivid) |
no longer affects: | linux-lts-trusty (Ubuntu Wily) |
no longer affects: | linux-lts-trusty (Ubuntu Xenial) |
Changed in linux-lts-trusty (Ubuntu Trusty): | |
status: | New → In Progress |
Changed in linux-lts-trusty (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → High |
Changed in linux-lts-trusty (Ubuntu Trusty): | |
importance: | Undecided → High |
Changed in linux-lts-trusty (Ubuntu): | |
assignee: | nobody → Joseph Salisbury (jsalisbury) |
Changed in linux-lts-trusty (Ubuntu Trusty): | |
assignee: | nobody → Joseph Salisbury (jsalisbury) |
no longer affects: | linux (Ubuntu Vivid) |
Changed in linux (Ubuntu Trusty): | |
status: | In Progress → Fix Committed |
Changed in linux-lts-trusty (Ubuntu Trusty): | |
status: | In Progress → Fix Released |
Changed in linux (Ubuntu Xenial): | |
status: | Fix Committed → Fix Released |
Changed in linux (Ubuntu Wily): | |
status: | Fix Committed → Fix Released |
This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:
apport-collect 1519897
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.