WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] fix save or snapshot at kernel loading time with

To: "James (song wei)" <jsong@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] fix save or snapshot at kernel loading time with HVM vm
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 17 May 2010 11:03:56 +0100
Cc:
Delivery-date: Mon, 17 May 2010 03:04:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <28579732.post@xxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acr1hfem6QOaDlHSQJaJFYKz8PQW4gAIktNj
Thread-topic: [Xen-devel] [PATCH] fix save or snapshot at kernel loading time with HVM vm
User-agent: Microsoft-Entourage/12.24.0.100205
On 17/05/2010 06:57, "James (song wei)" <jsong@xxxxxxxxxx> 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@xxxxxxxxxx>
> 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:



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel