xend: passthrough: report attach errors from device model
PATCH 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]>
tools/python/xen/xend/XendDomainInfo.py +8 -0
@@ -755,6 +755,14 @@ 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)) + log.debug("XendDomainInfo.hvm_pci_device_insert_dev: vslot: %s" + % vslot) else: vslot = new_dev['requested_vslot']
Sorry, I hit the send button a little to fast. This patch contains tabs for indentation and a spurious debugging message. Quite an achievement for such a small change.
I will repost shortly.