xen/usb-list.patch
Charles Arnold eeeeaf88a6 - bnc#636231 - XEN: Unable to disconnect/remove CDROM drive from VM
xend-devid-or-name.patch

- Upstream patches from Jan
  22019-x86-cpuidle-online-check.patch
  22051-x86-forced-EOI.patch
  22067-x86-irq-domain.patch
  22068-vtd-irte-RH-bit.patch
  22071-ept-get-entry-lock.patch
  22084-x86-xsave-off.patch

- bnc#638465 - hypervisor panic in memory handling
  heaplock.patch

- Update to Xen 4.0.1.  This is a bug fix release.

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=73
2010-09-22 14:40:08 +00:00

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.1-testing/tools/python/xen/xm/main.py
===================================================================
--- xen-4.0.1-testing.orig/tools/python/xen/xm/main.py
+++ xen-4.0.1-testing/tools/python/xen/xm/main.py
@@ -2545,10 +2545,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')