lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM5PR21MB013752686F0911F0254E8E5AD7B80@DM5PR21MB0137.namprd21.prod.outlook.com>
Date:   Wed, 4 Sep 2019 16:43:15 +0000
From:   Michael Kelley <mikelley@...rosoft.com>
To:     Dexuan Cui <decui@...rosoft.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Sasha Levin <Alexander.Levin@...rosoft.com>,
        "sashal@...nel.org" <sashal@...nel.org>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        KY Srinivasan <kys@...rosoft.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v4 02/12] x86/hyper-v: Implement
 hv_is_hibernation_supported()

From: Dexuan Cui <decui@...rosoft.com> Sent: Monday, September 2, 2019 5:23 PM
> 
> The API will be used by the hv_balloon and hv_vmbus drivers.
> 
> Balloon up/down and hot-add of memory must not be active if the user
> wants the Linux VM to support hibernation, because they are incompatible
> with hibernation according to Hyper-V team, e.g. upon suspend the
> balloon VSP doesn't save any info about the ballooned-out pages (if any);
> so, after Linux resumes, Linux balloon VSC expects that the VSP will
> return the pages if Linux is under memory pressure, but the VSP will
> never do that, since the VSP thinks it never stole the pages from the VM.
> 
> So, if the user wants Linux VM to support hibernation, Linux must forbid
> balloon up/down and hot-add, and the only functionality of the balloon VSC
> driver is reporting the VM's memory pressure to the host.
> 
> Ideally, when Linux detects that the user wants it to support hibernation,
> the balloon VSC should tell the VSP that it does not support ballooning
> and hot-add. However, the current version of the VSP requires the VSC
> should support these capabilities, otherwise the capability negotiation
> fails and the VSC can not load at all, so with the later changes to the
> VSC driver, Linux VM still reports to the VSP that the VSC supports these
> capabilities, but the VSC ignores the VSP's requests of balloon up/down
> and hot add, and reports an error to the VSP, when applicable. BTW, in
> the future the balloon VSP driver will allow the VSC to not support the
> capabilities of balloon up/down and hot add.
> 
> The ACPI S4 state is not a must for hibernation to work, because Linux is
> able to hibernate as long as the system can shut down. However in practice
> we decide to artificially use the presence of the virtual ACPI S4 state as
> an indicator of the user's intent of using hibernation, because Linux VM
> must find a way to know if the user wants to use the hibernation feature
> or not.
> 
> By default, Hyper-V does not enable the virtual ACPI S4 state; on recent
> Hyper-V hosts (e.g. RS5, 19H1), the administrator is able to enable the
> state for a VM by WMI commands.
> 
> Once all the vmbus and VSC patches for the hibernation feature are
> accepted, an extra patch will be submitted to forbid hibernation if the
> virtual ACPI S4 state is absent, i.e. hv_is_hibernation_supported() is
> false.
> 
> Signed-off-by: Dexuan Cui <decui@...rosoft.com>
> ---
>  arch/x86/hyperv/hv_init.c      | 7 +++++++
>  include/asm-generic/mshyperv.h | 2 ++
>  2 files changed, 9 insertions(+)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ