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: Mon, 17 May 2010 11:03:56 +0100	[thread overview]
Message-ID: <C816D31C.146D9%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <28579732.post@talk.nabble.com>

On 17/05/2010 06:57, "James (song wei)" <jsong@novell.com> wrote:

> 
> If doing save or snapshot at the time of kernel loading of a HVN vm,
> event_channel haven't been initialized, so that make this saving with
> xenstore. a string named "suspend" not "suspended"  will be sent to xend
> from checkpoint thread.
>  But in the shutdown function with parameter "suspend" think this request
> should shutdown this hvm guest, but obviously, this is not the expectation
> of save or  snapshot.

I don't really understand this patch comment, and the solution just looks
like a poor hack which noone in future will be able to fathom.

 -- Keir

> -James (Song Wei)
> 
> Signed-off-by:James (Song Wei) <jsong@novell.com>
> diff -r baccadfd9418 tools/python/xen/xend/XendDomainInfo.py
> --- a/tools/python/xen/xend/XendDomainInfo.py   Fri May 14 08:05:05 2010
> +0100
> +++ b/tools/python/xen/xend/XendDomainInfo.py   Mon May 17 13:56:15 2010
> +0800
> @@ -530,7 +530,7 @@
>          self.storeDom("control/shutdown", reason)
>  
>          # HVM domain shuts itself down only if it has PV drivers
> -        if self.info.is_hvm():
> +        if self.info.is_hvm() and reason != 'suspend':
>              hvm_pvdrv = xc.hvm_get_param(self.domid,
> HVM_PARAM_CALLBACK_IRQ)
>              hvm_s_state = xc.hvm_get_param(self.domid,
> HVM_PARAM_ACPI_S_STATE)
>              if not hvm_pvdrv or hvm_s_state != 0:

  reply	other threads:[~2010-05-17 10:03 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 [this message]
2010-05-19  6:44   ` James (song wei)
2010-05-19  7:47     ` Keir Fraser

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=C816D31C.146D9%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).