9fd34708c1
guest 21971-pod-accounting.patch - bnc#584204 - xm usb-list broken usb-list.patch - bnc#625520 - TP-L3: NMI cannot be triggered for xen kernel 21926-x86-pv-NMI-inject.patch - bnc#613529 - TP-L3: kdump kernel hangs when crash was initiated from xen kernel 21886-kexec-shutdown.patch - Upstream Intel patches to improve X2APIC handling. 21716-iommu-alloc.patch 21717-ir-qi.patch 21718-x2apic-logic.patch 21933-vtd-ioapic-write.patch 21953-msi-enable.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=71
46 lines
1.7 KiB
Diff
46 lines
1.7 KiB
Diff
"usb-hc-create" does not check usb-ver parameter. It allows 2/2.0/2.0usb/2.0aaa. While low level
|
|
driver doing hc create, it gets an integer by vssanf %d from usb-ver string, so there is no problem.
|
|
But 2/2.0/2.0usb/2.0aaa will be saved into VM config.
|
|
|
|
After that, while doing "usb-list", it cannot handle "2.0/2.0usb/2.0aaa" and will cause error:
|
|
Idx BE state usb-ver BE-path
|
|
Error: Invalid argument.
|
|
Usage: xm usb-list <Domain>
|
|
|
|
This patch is to let "usb-list" handle all usb-ver cases as low level driver does and won't cause error.
|
|
|
|
About this problem, I've submitted two patches to upstream before, but got no response. Information
|
|
could be referred to:
|
|
http://www.gossamer-threads.com/lists/xen/devel/178406?search_string=usb-list;#178406
|
|
http://www.gossamer-threads.com/lists/xen/devel/181021?search_string=usb-list;#181021
|
|
|
|
|
|
Index: xen-4.0.0-testing/tools/python/xen/xm/main.py
|
|
===================================================================
|
|
--- xen-4.0.0-testing.orig/tools/python/xen/xm/main.py
|
|
+++ xen-4.0.0-testing/tools/python/xen/xm/main.py
|
|
@@ -2543,10 +2543,22 @@ def xm_usb_list(args):
|
|
ni = parse_dev_info(x[1])
|
|
ni['idx'] = int(x[0])
|
|
usbver = sxp.child_value(x[1], 'usb-ver')
|
|
+
|
|
+ substr = re.search("^\d{1,}", usbver)
|
|
+ if substr:
|
|
+ usbver = substr.group()
|
|
+ else:
|
|
+ print "Unknown usb-ver"
|
|
+ continue
|
|
+
|
|
if int(usbver) == 1:
|
|
ni['usb-ver'] = 'USB1.1'
|
|
- else:
|
|
+ elif int(usbver) == 2:
|
|
ni['usb-ver'] = 'USB2.0'
|
|
+ else:
|
|
+ print "Unknown usb-ver"
|
|
+ continue
|
|
+
|
|
print "%(idx)-3d %(backend-id)-3d %(state)-5d %(usb-ver)-7s %(be-path)-30s " % ni
|
|
|
|
ports = sxp.child(x[1], 'port')
|