ia64/xen-unstable

changeset 19715:f569292aacc5

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>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 04 10:37:39 2009 +0100 (2009-06-04)
parents 76afaac7df86
children a3125a83e40b
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Thu Jun 04 10:36:36 2009 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Jun 04 10:37:39 2009 +0100
     1.3 @@ -752,6 +752,12 @@ class XendDomainInfo:
     1.4  
     1.5              vslot = xstransact.Read("/local/domain/0/device-model/%i/parameter"
     1.6                                      % self.getDomid())
     1.7 +            try:
     1.8 +                vslot_int = int(vslot, 16)
     1.9 +            except ValueError:
    1.10 +                raise VmError(("Cannot pass-through PCI function '%s'. " +
    1.11 +                               "Device model reported an error: %s") %
    1.12 +                              (bdf_str, vslot))
    1.13          else:
    1.14              vslot = new_dev['vslot']
    1.15