xend: passthrough: report attach errors from device model
PATCH v2 1/1 xend: passthrough: report attach errors from device model
Cc Masaki Kanno <[email protected]>
Cc Edwin Zhai <[email protected]>
Signed-off-by Simon Horman <[email protected]>
---
Changes
- Use spaces for indentation
- Removed spurious debug message
tools/python/xen/xend/XendDomainInfo.py +6 -0
@@ -755,6 +755,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['requested_vslot']