xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.fraser@eu.citrix.com>
To: "James (song wei)" <jsong@novell.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] fix save or snapshot at kernel loading time with HVM vm
Date: Wed, 19 May 2010 08:47:04 +0100	[thread overview]
Message-ID: <C8195608.1496C%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <28604661.post@talk.nabble.com>

On 19/05/2010 07:44, "James (song wei)" <jsong@novell.com> wrote:

>>     Sorry for not descripting this issue clearly.  When I do save at the
>> beginning of HVM guest booting(first stage - loading kernel), I found
>> guest os destoryed after saving completely.

Well, that's expected isn't it? Normally, saving a guest should save its
state to a file and destroy the guest, so that the saved state can be safely
resumed later.

>> So I see the code and get this flow:
>> xc_save()( here, call this function, when loading the kernel at the time
>> of guest booting. Event channel haven't been initialized,so that go to
>> compat_suspend() path in suspend()(save.c) -->> then, notify  the thread
>> named saveInputHandler in xend with a string "suspend". so  that
>> dominfo.shutdown is invoked.

That's required. We need the guest to shutdown with state SHUTDOWN_suspend,
so that we can save a consistent snapshot of its state. If you skip the
shutdown then you break domain save in the absence of PV drivers. It will be
broken because the guest will continue to run while xc_save does its work --
hence it will not save a consistent snapshot of the guest state.

 -- Keir

>> So, VM shutdown after do saving operator.

      reply	other threads:[~2010-05-19  7:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-17  5:57 [PATCH] fix save or snapshot at kernel loading time with HVM vm James (song wei)
2010-05-17 10:03 ` Keir Fraser
2010-05-19  6:44   ` James (song wei)
2010-05-19  7:47     ` Keir Fraser [this message]

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=C8195608.1496C%keir.fraser@eu.citrix.com \
    --to=keir.fraser@eu.citrix.com \
    --cc=jsong@novell.com \
    --cc=xen-devel@lists.xensource.com \
    /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;
as well as URLs for NNTP newsgroup(s).