Thread (3 messages) 3 messages, 2 authors, 2020-01-23

RE: [PATCH v2 3/4] hv_utils: Support host-initiated hibernation request

From: Dexuan Cui <decui@microsoft.com>
Date: 2020-01-23 08:11:27
Also in: lkml

From: Michael Kelley <redacted>
quoted
--- a/drivers/hv/hv_util.c
+++ b/drivers/hv/hv_util.c
...
 static const int sd_versions[] = {
 	SD_VERSION_3_1,
+	SD_VERSION_3_2,
I think these versions need to listed in descending order, so the new
SD_VERSION_3_2 should be listed first.  Otherwise a Hyper-V host that
supports both 3.1 and 3.2 might match on 3.1 first without ever checking
for a match with 3.2.
Thanks! This is a rebasing mistake. Will fix it.
quoted
@@ -187,6 +226,17 @@ static void shutdown_onchannelcallback(void
*context)
quoted
 				schedule_work(&restart_work);
 				break;
+			case 4:
+			case 5:
As before, I'm wondering about the interpretation of these numbers.
Will add a comment.
 
quoted
+				pr_info("Hibernation request received\n");
+
+				if (execute_hibernate) {
+					icmsghdrp->status = HV_S_OK;
+					schedule_work(&hibernate_context.work);
Same comment here about the ordering of the schedule_work() call and the
sending of the response message.  Seems like the code should be consistent
for all three cases -- shutdown, restart, and hibernate.
I agree. Will fix this.

Thanks,
-- Dexuan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help