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-changelog

[Xen-changelog] [xen-unstable] xend: Fix building PV guests after introd

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Fix building PV guests after introducing new HVM-HAP config option.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 29 Jan 2008 07:40:16 -0800
Delivery-date: Tue, 29 Jan 2008 07:40:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1201619795 0
# Node ID 233f40973e1d689d66b25e439b2f48524dd579ea
# Parent  04e24b9dcc1649e86d3e94a81489dab9c6ec82bc
xend: Fix building PV guests after introducing new HVM-HAP config option.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py     |    2 +-
 tools/python/xen/xend/XendDomainInfo.py |   11 +++--------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff -r 04e24b9dcc16 -r 233f40973e1d tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Tue Jan 29 15:15:51 2008 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Tue Jan 29 15:16:35 2008 +0000
@@ -1595,4 +1595,4 @@ class XendConfig(dict):
         return stored_type or (self.is_hvm() and 'hvm' or 'linux')
 
     def is_hap(self):
-        return self['platform']['hap']
+        return self['platform'].get('hap', 0)
diff -r 04e24b9dcc16 -r 233f40973e1d tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Tue Jan 29 15:15:51 2008 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Tue Jan 29 15:16:35 2008 +0000
@@ -1626,19 +1626,14 @@ class XendDomainInfo:
         @raise: VmError on error
         """
 
-        hvm_bit_offset = 0
-
-        hap_bit_offset = 1
-
         log.debug('XendDomainInfo.constructDomain')
 
         self.shutdownStartTime = None
 
+        hap = 0
         hvm = self.info.is_hvm()
-
-        hap = self.info.is_hap()
-
         if hvm:
+            hap = self.info.is_hap()
             info = xc.xeninfo()
             if 'hvm' not in info['xen_caps']:
                 raise VmError("HVM guest support is unavailable: is VT/AMD-V "
@@ -1663,7 +1658,7 @@ class XendDomainInfo:
                 domid = 0,
                 ssidref = ssidref,
                 handle = uuid.fromString(self.info['uuid']),
-                flags = int((hvm << hvm_bit_offset) | (hap << hap_bit_offset)),
+                flags = int((hvm << 0) | (hap << 1)),
                 target = self.info.target())
         except Exception, e:
             # may get here if due to ACM the operation is not permitted

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: Fix building PV guests after introducing new HVM-HAP config option., Xen patchbot-unstable <=