diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-06-04 10:37:39 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-06-04 10:37:39 +0100 |
commit | 2cad22d41f621dc86401730d5dcec3191347054e (patch) | |
tree | 35aa06d2b4cba91e93f0a951d6703164fa896780 /tools | |
parent | 310311cd88634b53672295c8c4ae6d0891fd590a (diff) | |
download | xen-2cad22d41f621dc86401730d5dcec3191347054e.tar.gz xen-2cad22d41f621dc86401730d5dcec3191347054e.tar.bz2 xen-2cad22d41f621dc86401730d5dcec3191347054e.zip |
xend: pass-through: report attach errors from device model
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Cc: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/python/xen/xend/XendDomainInfo.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index b4e6e49cf5..b1befd7267 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -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'] |