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

[Xen-devel] Re: HVM save/restore issue

To: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: HVM save/restore issue
From: "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Date: Fri, 16 Mar 2007 13:45:14 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Delivery-date: Thu, 15 Mar 2007 22:50:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070315100244.GB32000@xxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070315074842.GA21485@xxxxxxxxxxxxxxxxxxxxxx> <20070315100244.GB32000@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
On Thu, Mar 15, 2007 at 10:02:44AM +0000, Tim Deegan wrote:
> At 15:48 +0800 on 15 Mar (1173973722), Zhai, Edwin wrote:
> > all,
> > there are 2 issues of HVM save/restore:
> > 1. restore would cause a type dismatch exception, which can be fixed by 
> > attached 
> > patch.
> 
> I can't reproduce this exception. 

i can still reproduce on staging tree r14401.
trace log
====================================================
[2007-03-16 13:32:22 5071] ERROR (XendDomain:1034) Restore failed
Traceback (most recent call last):
  File "/usr/lib64/python/xen/xend/XendDomain.py", line 1029, in 
domain_restore_fd
    return XendCheckpoint.restore(self, fd, paused=paused)
  File "/usr/lib64/python/xen/xend/XendCheckpoint.py", line 199, in restore
    dominfo.domid, hvm, apic, pae)
  File "/usr/lib64/python2.3/logging/__init__.py", line 893, in info
    apply(self._log, (INFO, msg, args), kwargs)
  File "/usr/lib64/python2.3/logging/__init__.py", line 994, in _log
    self.handle(record)
  File "/usr/lib64/python2.3/logging/__init__.py", line 1004, in handle
    self.callHandlers(record)
  File "/usr/lib64/python2.3/logging/__init__.py", line 1037, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python2.3/logging/__init__.py", line 592, in handle
    self.emit(record)
  File "/usr/lib64/python2.3/logging/handlers.py", line 102, in emit
    msg = "%s\n" % self.format(record)
  File "/usr/lib64/python2.3/logging/__init__.py", line 567, in format
    return fmt.format(record)
  File "/usr/lib64/python2.3/logging/__init__.py", line 362, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.3/logging/__init__.py", line 233, in getMessage
    msg = msg % self.args
TypeError: int argument required

> 
> >      if is_hvm:
> >          hvm  = dominfo.info['memory_static_min']
> > -        apic = dominfo.info['platform'].get('apic', 0)
> > -        pae  = dominfo.info['platform'].get('pae',  0)
> > +        apic = int(dominfo.info['platform'].get('apic', 0))
> > +        pae  = int(dominfo.info['platform'].get('pae',  0))
> 
> AFAICS, 'apic' and 'pae' are mapped through str() when they're used, so I
> don't see that it helps to cast them to integers now.
> Is there a reason you don't pass 'hvm' through int() as well?

change the "apic=%d" to "%s" is also okay. hvm is int as it come from 
dominfo.info['memory_static_min'].

thanks,

> 
> Cheers,
> 
> Tim.
> 
> -- 
> Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, XenSource UK Limited
> Registered office c/o EC2Y 5EB, UK; company number 05334508
> 

-- 
best rgds,
edwin

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