RE: [PATCH v4 2/4] hv_utils: Support host-initiated restart request
From: Michael Kelley
Date: Sun Jan 26 2020 - 01:06:04 EST
From: Dexuan Cui <decui@xxxxxxxxxxxxx> Sent: Saturday, January 25, 2020 9:50 PM
>
> The hv_utils driver currently supports a "shutdown" operation initiated
> from the Hyper-V host. Newer versions of Hyper-V also support a "restart"
> operation. So add support for the updated protocol version that has
> "restart" support, and perform a clean reboot when such a message is
> received from Hyper-V.
>
> To test the restart functionality, run this PowerShell command on the
> Hyper-V host:
>
> Restart-VM <vmname> -Type Reboot
>
> Signed-off-by: Dexuan Cui <decui@xxxxxxxxxxxxx>
>
> ---
> Changes in v2:
> It's the same as v1.
>
> Changes in v3 (I addressed Michael's comments):
> Used a better version of changelog from Michael.
> Added a comment about the meaning of shutdown_msg->flags.
> Call schedule_work() at the end of the function for consistency.
>
> Changes in v4 (Thanks to Michael!):
> Used a compact way to handle the work items.
>
> drivers/hv/hv_util.c | 39 +++++++++++++++++++++++++++++++--------
> 1 file changed, 31 insertions(+), 8 deletions(-)
>
Reviewed-by: Michael Kelley <mikelley@xxxxxxxxxxxxx>