Simon Horman
2009-Jun-01 02:40 UTC
[Xen-devel] [patch] xend: passthrough: 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> Index: xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py ==================================================================--- xen-unstable.hg.orig/tools/python/xen/xend/XendDomainInfo.py 2009-06-01 11:57:04.000000000 +1000 +++ xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py 2009-06-01 12:37:05.000000000 +1000 @@ -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''] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Simon Horman
2009-Jun-01 02:43 UTC
[Xen-devel] Re: [patch] xend: passthrough: report attach errors from device model
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. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel