lkml.org 
[lkml]   [2020]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 3/4] hv_utils: Support host-initiated hibernation request
Date
> From: Michael Kelley <mikelley@microsoft.com>
> > --- 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.

> > @@ -187,6 +226,17 @@ static void shutdown_onchannelcallback(void
> *context)
> >
> > schedule_work(&restart_work);
> > break;
> > + case 4:
> > + case 5:
>
> As before, I'm wondering about the interpretation of these numbers.

Will add a comment.

> > + 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

\
 
 \ /
  Last update: 2020-01-23 09:12    [W:0.047 / U:1.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site