lkml.org 
[lkml]   [2020]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v4 3/4] hv_utils: Support host-initiated hibernation request
Date
From: Dexuan Cui <decui@microsoft.com> Sent: Saturday, January 25, 2020 9:50 PM
>
> Update the Shutdown IC version to 3.2, which is required for the host to
> send the hibernation request.
>
> The user is expected to create the below udev rule file, which is applied
> upon the host-initiated hibernation request:
>
> root@localhost:~# cat /usr/lib/udev/rules.d/40-vm-hibernation.rules
> SUBSYSTEM=="vmbus", ACTION=="change", DRIVER=="hv_utils",
> ENV{EVENT}=="hibernate", RUN+="/usr/bin/systemctl hibernate"
>
> Signed-off-by: Dexuan Cui <decui@microsoft.com>
>
> ---
> Changes in v2:
> Send the host-initiated hibernation request to the user space via udev.
> (v1 used call_usermodehelper() and "/sbin/hyperv-hibernate".)
>
> Changes in v3 (I addressed Michael's comoments):
> Fixed the order issue in sd_versions[].
> Moved schedule_work() to a later place for consistency.
>
> Changes in v4 (Thanks to Michael!):
> Used a compact way to handle the work item.
>
> drivers/hv/hv_util.c | 49 +++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 48 insertions(+), 1 deletion(-)
>

Reviewed-by: Michael Kelley <mikelley@microsoft.com>

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