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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PU1P153MB0169E922DF7A5A43C7026D82BFB00@PU1P153MB0169.APCP153.PROD.OUTLOOK.COM>
Date:   Thu, 12 Sep 2019 19:18:25 +0000
From:   Dexuan Cui <decui@...rosoft.com>
To:     David Hildenbrand <david@...hat.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "sashal@...nel.org" <sashal@...nel.org>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Michael Kelley <mikelley@...rosoft.com>
Subject: RE: [PATCH] hv_balloon: Add the support of hibernation

> From: David Hildenbrand <david@...hat.com>
> Sent: Thursday, September 12, 2019 3:09 AM
> On 12.09.19 01:36, Dexuan Cui wrote:
> > When hibernation is enabled, we must ignore the balloon up/down and
> > hot-add requests from the host, if any.
> 
> Why do you even care about supporting hibernation? Can't you just pause
> the VM in the hypervisor and continue to live a happy life? :)
> 
> (to be more precise, most QEMU/KVM distributions I am aware of don't
> support suspend/hibernation of guests for said reason, so I wonder why
> Hyper-V needs it)

In some scenarios, hibernation can be better than pause/unpause,
save/restore and live migration:

1. Compared to pause/unpause, the VM can power off completely with
hibernation, and all the states are saved inside the VM image, then the
image can be copied to another host to start the VM again, as long as
the new host uses exactly the same configuration for the VM.

2. Compared to pause/unpause, hibernation may be more reliable, since it's
performed by the VM kernel rather than the host, so the VM kernel may
better tackle some clock-source/event-sensitive issues.

3. Hibernation can be especially useful when we pass through a PCIe device,
e.g. a NIC, a NVMe controller or a GPU, to the VM, as usually save/restore
and live migration can not work with this kind of configuration, because
usually the host doesn't know how to save/restore the state of the PCIe
device.

> > This patch is basically a pure Hyper-V specific change and it has a
> > build dependency on the commit 271b2224d42f ("Drivers: hv: vmbus:
> Implement
> > suspend/resume for VSC drivers for hibernation"), which is on Sasha Levin's
> > Hyper-V tree's hyperv-next branch
> > @@ -1672,6 +1694,24 @@ static int balloon_probe(struct hv_device *dev,
> >  {
> >  	int ret;
> >
> > +#if 0
> 
> I am not sure if that's a good idea. Can't you base this series on
> hv_is_hibernation_supported() ?

Unluckily, I can not. :-(

My hv_is_hibernation_supported() patch is still in review, and has not been
in any tree yet (it's supposed to go through the tip.git tree's timers/core
branch since otherwise the branch contains some patches that would 
cause conflicts): 
https://lkml.org/lkml/2019/9/5/1158
https://lkml.org/lkml/2019/9/5/1160
 
> > +	/*
> > +	 * The patch to implement hv_is_hibernation_supported() is going
> > +	 * through the tip tree. For now, let's hardcode allow_hibernation
> > +	 * to false to keep the current behavior of hv_balloon. If people
> > +	 * want to test hibernation, please blacklist hv_balloon for now
> > +	 * or do not enable Dynamid Memory and Memory Resizing.
> > +	 *
> > +	 * We'll remove the conditional compilation as soon as
> > +	 * hv_is_hibernation_supported() is available in the mainline tree.
> > +	 */
> > +	allow_hibernation = hv_is_hibernation_supported();
> > +#else
> > +	allow_hibernation = false;
> > +#endif

Thanks,
-- Dexuan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ