public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roman Kisel <romank@linux.microsoft.com>
To: mhklinux@outlook.com, haiyangz@microsoft.com, wei.liu@kernel.org,
	decui@microsoft.com, corbet@lwn.net,
	linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH 1/1] Documentation: hyperv: Add overview of guest VM hibernation
Date: Fri, 13 Dec 2024 10:43:49 -0800	[thread overview]
Message-ID: <130fb73d-110e-4aec-9491-371da9d0e338@linux.microsoft.com> (raw)
In-Reply-To: <20241212231700.6977-1-mhklinux@outlook.com>

On 12/12/2024 3:17 PM, mhkelley58@gmail.com wrote:
> From: Michael Kelley <mhklinux@outlook.com>
> 
> Add documentation on how hibernation works in a guest VM on Hyper-V.
> Describe how VMBus devices and the VMBus itself are hibernated and
> resumed, along with various limitations.
> 
> Signed-off-by: Michael Kelley <mhklinux@outlook.com>
> ---
>   Documentation/virt/hyperv/hibernation.rst | 312 ++++++++++++++++++++++
>   Documentation/virt/hyperv/index.rst       |   1 +
>   2 files changed, 313 insertions(+)
>   create mode 100644 Documentation/virt/hyperv/hibernation.rst
> 
> diff --git a/Documentation/virt/hyperv/hibernation.rst b/Documentation/virt/hyperv/hibernation.rst
> new file mode 100644
> index 000000000000..9e177c1f5bae
> --- /dev/null
> +++ b/Documentation/virt/hyperv/hibernation.rst
> @@ -0,0 +1,312 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +

---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8

> +Considerations for Guest VM Hibernation
> +---------------------------------------
> +Linux guests on Hyper-V can also be hibernated, in which case the
> +hardware is the virtual hardware provided by Hyper-V to the guest VM.
> +Only the targeted guest VM is hibernated, while other guest VMs and
> +the underlying Hyper-V host continue to run normally. While the
> +underlying Windows Hyper-V and physical hardware on which it is
> +running might also be hibernated using hibernation functionality in
> +the Windows host, host hibernation and its impact on guest VMs is not
> +in scope for this documentation.
> +
> +Resuming a hibernated guest VM can be more challenging than with
> +physical hardware because VMs make it very easy to change the hardware
> +configuration between the hibernation and resume. Even when the resume
> +is done on the same VM that hibernated, the memory size might be
> +changed, or virtual NICs or SCSI controllers might be added or
> +removed. Virtual PCI devices assigned to the VM might be added or
> +removed. Most such changes cause the resume steps to fail, though
> +adding a new virtual NIC, SCSI controller, or vPCI device should work.
> +

Would it be useful mentioning the (likely lethal for the VM) risk
of copying the hibernated VM to another host (of the same arch) that has
another set of CPUID bits/features?

---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8

> +Key-Value Pair (KVP) Pseudo-Device Anomalies
> +--------------------------------------------

---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8


> +Virtual PCI devices
> +-------------------
> +Virtual PCI devices are physical PCI devices that are mapped directly


---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8 ---->8

Appreciated documenting all the intricacies of the hibernation and
resume paths for various devices, an incredible read! Are there
any special considerations known to you for the hibernation of
the devices driven through the Hyper-V UIO?

> +out-of-the-box by local Hyper-V and so requires custom scripting.
> diff --git a/Documentation/virt/hyperv/index.rst b/Documentation/virt/hyperv/index.rst
> index 79bc4080329e..c84c40fd61c9 100644
> --- a/Documentation/virt/hyperv/index.rst
> +++ b/Documentation/virt/hyperv/index.rst
> @@ -11,4 +11,5 @@ Hyper-V Enlightenments
>      vmbus
>      clocks
>      vpci
> +   hibernation
>      coco

Besides these two questions, LGTM.

-- 
Thank you,
Roman


  reply	other threads:[~2024-12-13 18:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12 23:17 [PATCH 1/1] Documentation: hyperv: Add overview of guest VM hibernation mhkelley58
2024-12-13 18:43 ` Roman Kisel [this message]
2024-12-13 20:43   ` Michael Kelley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=130fb73d-110e-4aec-9491-371da9d0e338@linux.microsoft.com \
    --to=romank@linux.microsoft.com \
    --cc=corbet@lwn.net \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhklinux@outlook.com \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox