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] [patch 1/9] xend: pass-through: report attach errors from de

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch 1/9] xend: pass-through: report attach errors from device model
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Thu, 04 Jun 2009 13:21:16 +1000
Cc: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>, Edwin Zhai <edwin.zhai@xxxxxxxxx>, Dexuan Cui <dexuan.cui@xxxxxxxxx>
Delivery-date: Wed, 03 Jun 2009 20:25:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
References: <20090604032115.934982694@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.46-1
Cc: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Cc: Edwin Zhai <edwin.zhai@xxxxxxxxx>
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

--- 
Changes
- Use spaces for indentation
- Removed spurious debug message

Index: xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-unstable.hg.orig/tools/python/xen/xend/XendDomainInfo.py        
2009-06-04 12:45:56.000000000 +1000
+++ xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py     2009-06-04 
12:45:58.000000000 +1000
@@ -752,6 +752,12 @@ class XendDomainInfo:
 
             vslot = xstransact.Read("/local/domain/0/device-model/%i/parameter"
                                     % self.getDomid())
+            try:
+                vslot_int = int(vslot, 16)
+            except ValueError:
+                raise VmError(("Cannot pass-through PCI function '%s'. " +
+                               "Device model reported an error: %s") %
+                              (bdf_str, vslot))
         else:
             vslot = new_dev['vslot']
 

-- 

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