USB virtualisation (experimental)
PATCH 1/1 USB virtualisation (experimental)
Hi all,
A number of people have expressed interest in the USB virtualisation code. I'm making a patch against 2.0-testing available for those who wish to have a play with it.
Description:
USB virtualisation allows otherwise unprivileged domains to be given control of a USB port on the host. The unprivileged domain sees a virtual USB host controller with only the ports it has been granted access to. For instance, you might dedicate a USB webcam to one domain, a USB pendrive to another domain and a USB CD-burner to another.
This patch includes the kernel modifications (backend and frontend drivers) to 2.4.28 and modifications to the userspace toolset. This is sufficient to set up USB virtualisation for 2.4.28 on xen-2.0-testing.
There are still a few sticky bugs that are really annoying me at the moment but it is possible to mount USB flash drives, capture realtime video from a webcam, etc. in a domU by virtualising through dom0.
Disclaimers:
* Don't use it on production systems
* Don't trust it with data you care about
* Some USB device drivers may need tweaking - if you have problems with a device, let me know
* YMMV but it works for me ;-)
Installation:
1) download the patch from
http://www.cambridge.intel-research.net/~mwilli2/xen-2.0-testing-usb.patch
2) apply to a fresh xen-2.0-testing.bk using
patch -p1 < xen-2.0-testing-usb.patch
(say yes to all the SCCS checkouts)
3) set up some appropriate kernel configs in install/boot/config-2.4.28-xen{0,U}. You should enable CONFIG_XEN_USB_FRONTEND, CONFIG_USB in the configuration for any devices you want to run.
Don't (!) build drivers for devices you want to virtualise into dom0's kernel, or dom0 will grab the device before the backend gets a chance to export it.
4) build & install the updated kernel & tools on your test machine. Note again you _have_ to use the 2.4 kernels, 2.6 isn't supported (yet).
5) for frontend domains, add a
usb = [ 'port_number', 'port_number', ... ]
to the config file to give a domain control of those physical USB ports. You can specify ports on a hub by giving the path through the device tree e.g. '1/2' = second port on the hub plugged into the first port on the host.
Any questions, comments, problems, success reports - let us know!
Cheers,
Mark
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 5 lines · Mark Williamson
This patch includes the kernel modifications (backend and frontend drivers) to 2.4.28 and modifications to the userspace toolset. This is sufficient to set up USB virtualisation for 2.4.28 on xen-2.0-testing.
There are still a few sticky bugs that are really annoying me at the moment but it is possible to mount USB flash drives, capture realtime video from a webcam, etc. in a domU by virtualising through dom0.
Any questions, comments, problems, success reports - let us know!
Nice work, Mark! Will be checking this out, but need a 2.6 version. Will you be working on the 2.6 port in the near future? If not, perhaps we could help..
thanks,
Nivedita
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 1 line
Nice work, Mark!
Cheers! Don't get too excited until it works for you too though ;-)
Quoted 3 lines
Will be checking this out, but need
a 2.6 version. Will you be working on the 2.6
port in the near future?
It'll probably be a while - once I've chased down a few more issues and merged the patch into BitKeeper, I'm keen to go work on something else for a bit ;-)
I suspect porting the backend will be reasonably straightforward as I don't think the USB client API has changed much (at all?).
The frontend will probably require a little of work - the host controller interface has changed a bit. A quick scan of the code doesn't suggest anything dramatic, however.
Quoted 2 lines
If not, perhaps we could
help..
That would be very welcome :-) If you have the time to try it out I'd love to see a patch that I could merge.
Another thing I'd like to see someday is a BSD frontend. My frontend is GPL so it's probably easiest to rewrite a BSD frontend from scratch. If anyone in the community is interested I could provide assistance.
Cheers,
Mark
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Mark, how did you manage to include in the patch also main.bak, main.c2? ;-)
I am longing to see 2.6 USB virtualization soon.
Thank you,
AQ
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 2 lines
Mark, how did you manage to include in the patch also main.bak, main.c2? ;-)
Oops, sorry :-) They were just hanging around in the src tree and got plopped out when I did the diff. Ignore them.
Let me know how you get on if you try this out.
Cheers,
Mark
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
All,
Here is an updated USB virtualisation patch. Things are rather more well behaved now. I just dumped 8 meg of video out of a USB webcam and onto a USB pendrive (with both of these peripherals running through the USB virt system), no problems at all.
I'm intending to merge this into -unstable fairly soon but in the meantime, the patches are against 2.0-testing.
Enjoy,
Mark
Quoted 55 lines · Mark Williamson
Hi all,
A number of people have expressed interest in the USB virtualisation code. I'm making a patch against 2.0-testing available for those who wish to have a play with it.
Description:
USB virtualisation allows otherwise unprivileged domains to be given control of a USB port on the host. The unprivileged domain sees a virtual USB host controller with only the ports it has been granted access to. For instance, you might dedicate a USB webcam to one domain, a USB pendrive to another domain and a USB CD-burner to another.This patch includes the kernel modifications (backend and frontend drivers) to 2.4.28 and modifications to the userspace toolset. This is sufficient to set up USB virtualisation for 2.4.28 on xen-2.0-testing.
There are still a few sticky bugs that are really annoying me at the moment but it is possible to mount USB flash drives, capture realtime video from a webcam, etc. in a domU by virtualising through dom0.
Disclaimers:
* Don't use it on production systems
* Don't trust it with data you care about
* Some USB device drivers may need tweaking - if you have problems with a device, let me know
* YMMV but it works for me ;-)Installation:
1) download the patch from
http://www.cambridge.intel-research.net/~mwilli2/xen-2.0-testing-usb.patch
2) apply to a fresh xen-2.0-testing.bk using
patch -p1 < xen-2.0-testing-usb.patch
(say yes to all the SCCS checkouts)
3) set up some appropriate kernel configs in install/boot/config-2.4.28-xen{0,U}. You should enableCONFIG_XEN_USB_FRONTEND,CONFIG_USBin the configuration for any devices you want to run.
Don't (!) build drivers for devices you want to virtualise into dom0's kernel, or dom0 will grab the device before the backend gets a chance to export it. 4) build & install the updated kernel & tools on your test machine. Note again you _have_ to use the 2.4 kernels, 2.6 isn't supported (yet). 5) for frontend domains, add a
usb = [ 'port_number', 'port_number', ... ]
to the config file to give a domain control of those physical USB ports. You can specify ports on a hub by giving the path through the device tree e.g. '1/2' = second port on the hub plugged into the first port on the host.Any questions, comments, problems, success reports - let us know!
Cheers,
Mark
Quoted 8 lines
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xen-devel
linux-2.4.28-xen-sparse/arch/xen/Makefile +2 -0
@@ -61,6 +61,7 @@ SUBDIRS += arch/xen/drivers/evtchn SUBDIRS += arch/xen/drivers/blkif SUBDIRS += arch/xen/drivers/netif +SUBDIRS += arch/xen/drivers/usbif SUBDIRS += arch/xen/drivers/balloon ifdef CONFIG_XEN_PRIVILEGED_GUEST SUBDIRS += arch/xen/drivers/dom0
@@ -71,6 +72,7 @@ CORE_FILES += arch/xen/drivers/console/drv.o DRIVERS += arch/xen/drivers/blkif/drv.o DRIVERS += arch/xen/drivers/netif/drv.o +DRIVERS += arch/xen/drivers/usbif/drv.o ifdef CONFIG_XEN_PRIVILEGED_GUEST CORE_FILES += arch/xen/drivers/dom0/drv.o endif
linux-2.4.28-xen-sparse/arch/xen/config.in +7 -2
@@ -19,11 +19,12 @@ bool 'Scrub memory before freeing it to Xen' CONFIG_XEN_SCRUB_PAGES bool 'Network-device frontend driver' CONFIG_XEN_NETDEV_FRONTEND bool 'Block-device frontend driver' CONFIG_XEN_BLKDEV_FRONTEND +bool 'USB-device frontend driver' CONFIG_XEN_USB_FRONTEND endmenu # The IBM S/390 patch needs this. define_bool CONFIG_NO_IDLE_HZ y -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" == "y" ]; then +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then define_bool CONFIG_FOREIGN_PAGES y else define_bool CONFIG_FOREIGN_PAGES n
@@ -262,7 +263,7 @@ source drivers/char/Config.in -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" -o "$CONFIG_XEN_USB_FRONTEND" = "y" ]; then source drivers/media/Config.in fi
@@ -295,9 +296,13 @@ source drivers/sound/Config.in fi endmenu +fi +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" -o "$CONFIG_XEN_USB_FRONTEND" = "y" ]; then source drivers/usb/Config.in +fi +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then source net/bluetooth/Config.in fi
linux-2.4.28-xen-sparse/arch/xen/drivers/usbif/Makefile +10 -0
@@ -0,0 +1,10 @@ + +O_TARGET := drv.o + +subdir-$(CONFIG_XEN_USB_FRONTEND) += frontend +obj-$(CONFIG_XEN_USB_FRONTEND) += frontend/drv.o + +subdir-$(CONFIG_XEN_PHYSDEV_ACCESS) += backend +obj-$(CONFIG_XEN_PHYSDEV_ACCESS) += backend/drv.o + +include $(TOPDIR)/Rules.make
linux-2.4.28-xen-sparse/arch/xen/drivers/usbif/backend/Makefile +3 -0
@@ -0,0 +1,3 @@ +O_TARGET := drv.o +obj-y := main.o interface.o control.o # vrh.o don't think I need this! +include $(TOPDIR)/Rules.make
linux-2.4.28-xen-sparse/arch/xen/drivers/usbif/backend/common.h +87 -0
87 lines not on this page · raw message
linux-2.4.28-xen-sparse/arch/xen/drivers/usbif/backend/control.c +77 -0
77 lines not on this page · raw message
linux-2.4.28-xen-sparse/arch/xen/drivers/usbif/backend/interface.c +248 -0
248 lines not on this page · raw message
linux-2.4.28-xen-sparse/arch/xen/drivers/usbif/backend/main.c +991 -0
991 lines not on this page · raw message
linux-2.4.28-xen-sparse/arch/xen/drivers/usbif/frontend/Makefile +3 -0
@@ -0,0 +1,3 @@ +O_TARGET := drv.o +obj-y := main.o +include $(TOPDIR)/Rules.make
linux-2.4.28-xen-sparse/arch/xen/drivers/usbif/frontend/main.c +1714 -0
1,533 lines not on this page · raw message
linux-2.4.28-xen-sparse/arch/xen/drivers/usbif/frontend/xhci.h +210 -0
210 lines not on this page · raw message
linux-2.4.28-xen-sparse/arch/xen/drivers/usbif/usbif.h +111 -0
111 lines not on this page · raw message
linux-2.4.28-xen-sparse/drivers/usb/hcd.c +1511 -0
1,511 lines not on this page · raw message
tools/python/xen/lowlevel/xu/xu.c +111 -0
111 lines not on this page · raw message
tools/python/xen/xend/#XendClient.py# +655 -0
655 lines not on this page · raw message
tools/python/xen/xend/XendDomainInfo.py +30 -0
Lines of this file are not shown. View the raw message.
tools/python/xen/xend/server/SrvDaemon.py +12 -0
Lines of this file are not shown. View the raw message.
tools/python/xen/xend/server/SrvUsbif.py +249 -0
249 lines not on this page · raw message
tools/python/xen/xend/server/messages.py +64 -0
64 lines not on this page · raw message
tools/python/xen/xend/server/usbif.py +368 -0
368 lines not on this page · raw message
xen/include/public/io/domain_controller.h +204 -1
205 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
All,
I have updated the USB virtualisation patch at:
http://www.cambridge.intel-research.net/~mwilli2/xen-2.0-testing-usb.patch
Description:
* Give guest operating systems under Xen access to USB devices plugged into the host. Adds a backend driver (for domain 0), a frontend driver (for guests) and extra support code in the tools.
Features:
* USB mass storage devices are now fully working (new!)
* USB isochronous transfers (larger buffers now supported, provided they are machine-contiguous)
Still to do:
* proper support for hot plugging of the physical devices
* stronger checking for iso transfers in the backend
* a little more work needed to make it work for all USB devices
* iron out a few lingering backend bugs
I'm intending to get this all done as soon as possible and then push into the -unstable tree.
Cheers,
Mark
Quoted 55 lines · Mark Williamson
Hi all,
A number of people have expressed interest in the USB virtualisation code. I'm making a patch against 2.0-testing available for those who wish to have a play with it.
Description:
USB virtualisation allows otherwise unprivileged domains to be given control of a USB port on the host. The unprivileged domain sees a virtual USB host controller with only the ports it has been granted access to. For instance, you might dedicate a USB webcam to one domain, a USB pendrive to another domain and a USB CD-burner to another.This patch includes the kernel modifications (backend and frontend drivers) to 2.4.28 and modifications to the userspace toolset. This is sufficient to set up USB virtualisation for 2.4.28 on xen-2.0-testing.
There are still a few sticky bugs that are really annoying me at the moment but it is possible to mount USB flash drives, capture realtime video from a webcam, etc. in a domU by virtualising through dom0.
Disclaimers:
* Don't use it on production systems
* Don't trust it with data you care about
* Some USB device drivers may need tweaking - if you have problems with a device, let me know
* YMMV but it works for me ;-)Installation:
1) download the patch from
http://www.cambridge.intel-research.net/~mwilli2/xen-2.0-testing-usb.patch
2) apply to a fresh xen-2.0-testing.bk using
patch -p1 < xen-2.0-testing-usb.patch
(say yes to all the SCCS checkouts)
3) set up some appropriate kernel configs in install/boot/config-2.4.28-xen{0,U}. You should enableCONFIG_XEN_USB_FRONTEND,CONFIG_USBin the configuration for any devices you want to run.
Don't (!) build drivers for devices you want to virtualise into dom0's kernel, or dom0 will grab the device before the backend gets a chance to export it. 4) build & install the updated kernel & tools on your test machine. Note again you _have_ to use the 2.4 kernels, 2.6 isn't supported (yet). 5) for frontend domains, add a
usb = [ 'port_number', 'port_number', ... ]
to the config file to give a domain control of those physical USB ports. You can specify ports on a hub by giving the path through the device tree e.g. '1/2' = second port on the hub plugged into the first port on the host.Any questions, comments, problems, success reports - let us know!
Cheers,
Mark
Quoted 8 lines
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xen-devel
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 1 line · Mark Williamson
* USB mass storage devices are now fully working (new!)
Woo, nice! I have an external MP3 player that is an USB mass storage hard drive - if the drive happens to spin down when plugging the cable in, it manages to freeze the USB subsystem in the kernel. Now I can just put it in a separate virtual machine and reboot it :-)
-- Naked
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 2 lines
Woo, nice! I have an external MP3 player that is an USB mass storage hard drive - if the drive happens to spin down when plugging the cable
Hmm, that's a nasty problem - I wonder what causes it.
Quoted 2 lines
in, it manages to freeze the USB subsystem in the kernel. Now I can just put it in a separate virtual machine and reboot it :-)
If it's freezing the USB subsystem (and nothing else), it implies a problem with the USB core and / or with the host controller driver. If it's the latter, you'd have to run the driver for your (hardware) host controller in the domain so that could be restarted too - the appropriate tool for that would be the existing PCI driver domains stuff.
What kind of host controller do you have? (or if you don't know, do you have USB 2.0?). Do all other USB devices freeze as well when you plug in the MP3 player? And do you get any interesting output from dmesg regarding the error?
Cheers,
Mark
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 5 lines · Mark Williamson
Quoted 3 lines
Woo, nice! I have an external MP3 player that is an USB mass storage hard drive - if the drive happens to spin down when plugging the cable
Hmm, that's a nasty problem - I wonder what causes it.
I'd say it is just a trivial bug in the kernel USB stuff - expecting some reply to always arrive, when it doesn't if the drive is unplugged at the unfortunate moment (or the drive dies, as in this case).
Quoted 10 lines
Quoted 2 lines
in, it manages to freeze the USB subsystem in the kernel. Now I can just put it in a separate virtual machine and reboot it :-)
If it's freezing the USB subsystem (and nothing else), it implies a problem with the USB core and / or with the host controller driver. If it's the latter, you'd have to run the driver for your (hardware) host controller in the domain so that could be restarted too - the appropriate tool for that would be the existing PCI driver domains stuff.
Quoted 4 lines
What kind of host controller do you have? (or if you don't know, do you have USB 2.0?). Do all other USB devices freeze as well when you plug in the MP3 player? And do you get any interesting output from dmesg regarding the error?
Dmesg of boot:
ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ACPI: PCI interrupt 0000:00:02.0[A] -> GSI 22 (level, high) -> IRQ 177ohci_hcd 0000:00:02.0: nVidia Corporation nForce2 USB Controller
PCI: Setting latency timer of device 0000:00:02.0 to 64ohci_hcd 0000:00:02.0: irq 177, pci mem f896e000ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
ACPI: PCI interrupt 0000:00:02.1[B] -> GSI 21 (level, high) -> IRQ 185ohci_hcd 0000:00:02.1: nVidia Corporation nForce2 USB Controller (#2)
PCI: Setting latency timer of device 0000:00:02.1 to 64ohci_hcd 0000:00:02.1: irq 185, pci mem f8970000ohci_hcd 0000:00:02.1: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
ACPI: PCI interrupt 0000:00:02.2[C] -> GSI 20 (level, high) -> IRQ 193ehci_hcd 0000:00:02.2: nVidia Corporation nForce2 USB Controller
PCI: Setting latency timer of device 0000:00:02.2 to 64ehci_hcd 0000:00:02.2: irq 193, pci mem f8972000ehci_hcd 0000:00:02.2: new USB bus registered, assigned bus number 3
PCI: cache line size of 64 is not supported by device 0000:00:02.2ehci_hcd 0000:00:02.2: USB 2.0 enabled, EHCI 1.00, driver 2004-May-10
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 6 ports detected
ieee1394: Initialized config rom entry `ip1394'
ohci1394: $Rev: 1223 $ Ben Collins <[email protected]>
ACPI: PCI interrupt 0000:00:0d.0[A] -> GSI 22 (level, high) -> IRQ 177
PCI: Setting latency timer of device 0000:00:0d.0 to 64
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[177] MMIO=[e2084000-e20847ff] Max Packet=[2048] ohci_hcd 0000:00:02.0: wakeup
Dmesg of successful plugging in of the drive:
usb 3-5: new high speed USB device using address 3 scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: FUJITSU Model: MHR2040AT Rev: 40BA
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
sda: assuming drive cache: write through
/dev/scsi/host0/bus0/target0/lun0: p1
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 USB Mass Storage device found at 3
Dmesg of an unsuccessful plugging in of the drive:
usb 3-5: new high speed USB device using address 5 scsi2 : SCSI emulation for USB Mass Storage devices
After that, nothing, no replugging or anything else helps. Only reboot.
-- Naked
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 1 line · Nuutti Kotivuori
After that, nothing, no replugging or anything else helps. Only reboot.
Neither removing usb modules?
-jkt
Signature · 8 lines
cd /local/pub && more beer > /dev/mouth ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 5 lines · Jan Kundrát
Quoted 2 lines · Nuutti Kotivuori
After that, nothing, no replugging or anything else helps. Only reboot.
Neither removing usb modules?
Usb is compiled into the kernel at the moment. I remember that removing usb-storage didn't help - removing all the usb modules might've helped, or it might've been that I couldn't remove them because they were in use.
-- Naked
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 3 lines
I'd say it is just a trivial bug in the kernel USB stuff - expecting some reply to always arrive, when it doesn't if the drive is unplugged at the unfortunate moment (or the drive dies, as in this case).
I was just wondering if it was in the storage driver, the low level host controller driver or maybe the USB core code. If all USB devices stop working, it suggests one of the latter two, otherwise it suggests the former and shouldn't even stop other USB storage devices from working.
Quoted 1 line
ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
I didn't think OHCI was very common on PCs but I guess
Quoted 4 lines
Dmesg of an unsuccessful plugging in of the drive:
usb 3-5: new high speed USB device using address 5 scsi2 : SCSI emulation for USB Mass Storage devices
Yuk!
The USB storage code has a certain amount of statefulness, so if it's hanging for that drive once, it may stop it working for the rest of the uptime. If the bug is in the USB storage code, you'll probably find that other storage devices still work, otherwise it may be somewhere else.
Cheers,
Mark
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 15 lines · Mark Williamson
All,
I have updated the USB virtualisation patch at:
http://www.cambridge.intel-research.net/~mwilli2/xen-2.0-testing-usb.patchDescription:
* Give guest operating systems under Xen access to USB devices plugged into the host. Adds a backend driver (for domain 0), a frontend driver (for guests) and extra support code in the tools.Features:
* USB mass storage devices are now fully working (new!)
* USB isochronous transfers (larger buffers now supported, provided they are machine-contiguous)
Quoted 8 lines
Still to do:
* proper support for hot plugging of the physical devices
* stronger checking for iso transfers in the backend
* a little more work needed to make it work for all USB devices
* iron out a few lingering backend bugsI'm intending to get this all done as soon as possible and then push into the -unstable tree.
Could it be possible to emulate a USB device in dom0 userspace?
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 1 line
Could it be possible to emulate a USB device in dom0 userspace?
Yes, that's doable in principle. You could, for instance, connect the guest's USB frontend to a userspace process that implemented:
a) the Xen USBif protocol (as implemented by the current backend driver)
b) software emulation of one or more actual USB devices per domain
This should actually be simpler to achieve than implementing virtual USB devices for a whole-machine emulator like Bochs, QEmu, VMWare, etc. because the paravirtualised interface is higher-level.
Cheers,
Mark
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt