From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yosuke Iwamatsu Subject: [PATCH 4/4] xend: Give stubdom flag to xc_save Date: Tue, 16 Dec 2008 18:24:03 +0900 Message-ID: <494773B3.6070606@ab.jp.nec.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060708070301080700010906" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: samuel.thibault@ens-lyon.org, Keir Fraser List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------060708070301080700010906 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Signed-off-by: Yosuke Iwamatsu Thanks, ----------------------- Yosuke Iwamatsu NEC Corporation --------------060708070301080700010906 Content-Type: all/allfiles; name="xend_stubdom_flag.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xend_stubdom_flag.patch" xend: Give stubdom flag to xc_save. Signed-off-by: Yosuke Iwamatsu diff -r 6595393a3d28 tools/python/xen/xend/XendCheckpoint.py --- a/tools/python/xen/xend/XendCheckpoint.py Tue Dec 09 16:28:02 2008 +0000 +++ b/tools/python/xen/xend/XendCheckpoint.py Tue Dec 16 14:40:36 2008 +0900 @@ -90,6 +90,7 @@ def save(fd, dominfo, network, live, dst image_cfg = dominfo.info.get('image', {}) hvm = dominfo.info.is_hvm() + stubdom = (dominfo.info.get_dm_type() == 'stubdom-dm') # xc_save takes three customization parameters: maxit, max_f, and # flags the last controls whether or not save is 'live', while the @@ -99,7 +100,7 @@ def save(fd, dominfo, network, live, dst # more information. cmd = [xen.util.auxbin.pathTo(XC_SAVE), str(fd), str(dominfo.getDomid()), "0", "0", - str(int(live) | (int(hvm) << 2)) ] + str(int(live) | (int(hvm) << 2) | (int(stubdom) << 4))] log.debug("[xc_save]: %s", string.join(cmd)) def saveInputHandler(line, tochild): diff -r 6595393a3d28 tools/python/xen/xend/XendConfig.py --- a/tools/python/xen/xend/XendConfig.py Tue Dec 09 16:28:02 2008 +0000 +++ b/tools/python/xen/xend/XendConfig.py Tue Dec 16 14:40:36 2008 +0900 @@ -1987,6 +1987,9 @@ class XendConfig(dict): def is_hvm(self): return self['HVM_boot_policy'] != '' + def get_dm_type(self): + return self['platform'].get('device_model', '').split('/')[-1] + def target(self): return self['target'] --------------060708070301080700010906 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------060708070301080700010906--