From: Max Krasnyansky <maxk@kernel.org>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org,
Paul Brook <paul@codesourcery.com>
Subject: Re: [PATCH 0/8] Various USB fixes and improvements (update 2)
Date: Mon, 18 Aug 2008 11:57:52 -0700 [thread overview]
Message-ID: <48A9C630.30108@kernel.org> (raw)
In-Reply-To: <48A98102.10904@codemonkey.ws>
Anthony Liguori wrote:
> Any objections to applying this series? It seems like the consensus is
> that OHCI support is better long term but this series seems pretty sane
> and self-contained.
I'm actually having seconds thought on the OHCI vs UHCI. You probably
saw my reply to Paul. New UHCI code is fairly clean and simple, and is
working well. But I definitely think that we should fix OHCI too, and at
some point we need to add EHCI (ie USB 2.0 stuff).
I have more patches coming. I made isoc transactions work on Friday
which made MS VX-3000 USB camera totally usable (will send a patch in a
couple of hours). And I'm working on making control transactions async
too which should shave off last bits of bad latency (2-3milliseconds)
from the USB code. Initially I thought control stuff is not very
frequent but this stupid USB webcam drivers does one very often.
So yeah, it be nice if this stuff is merged soonish :).
btw If you're using git as a front end to the SVN I can push my git tree
somewhere to kernel.org so that you can just pull the whole thing.
Max
>
> Regards,
>
> Anthony Liguori
>
> Max Krasnyansky wrote:
>> This is an updated version of the USB patches I sent out yesterday.
>> It includes changes and fixes suggested by Anthony.
>>
>> This time I also did more testing with XP running on top of QEMU/KQEMU
>> (used to be QEMU/KVM).
>>
>> Max Krasnyansky (8):
>> husb: support for USB host device auto disconnect.
>> husb: support for USB host device auto connect.
>> usb: generic packet handler cleanup and documentation
>> uhci: rewrite UHCI emulator, fully async operation with multiple
>> outstanding transactions
>> husb: rewrite Linux host USB layer, fully async operation
>> husb: remove disconnect detection timer
>> husb: fixup printfs and stuff based on the review comments
>> uhci: fixes for save/load-vm
>>
>> hw/usb-uhci.c | 905
>> ++++++++++++++++++++++++++++++++++-----------------------
>> hw/usb.c | 265 +++++++++--------
>> hw/usb.h | 37 +++-
>> usb-linux.c | 645 +++++++++++++++++++++++-----------------
>> vl.c | 83 +++---
>> 5 files changed, 1138 insertions(+), 797 deletions(-)
>>
>> ----
>> Here is the original description.
>>
>> This patch series started when I tried to share USB ports between four
>> instances of Windows XP running on the same Linux box (under KVM).
>> I quickly realized that current USB support is not very flexible. We do
>> not handle devices disconnects, there is not way to assign certain USB
>> ports to VM instance, etc.
>>
>> Once I fixed that I discovered that USB devices that I absolutely need
>> in the VMs (Xilinx and Altera USB dongles) do not really work with
>> QEMU. VMs were getting stuck, applications unhappy, etc.
>> So I endded up rewriting UHCI and Linux host USB layers to make them
>> fully async and to support multiple outstanding transactions.
>>
>> The result is quite nice. We can now assign USB buses to VM instances
>> and devices are automatically connected to the VMs. Just do
>> usb_add host:N.*
>> in the console or -usbdevice command line option (N is the bus number).
>> Also when device is disconnected from the host it's automatically removed
>> from the guest.
>>
>> Host USB devices operate in fully async mode (except the control
>> transfers).
>> All the stalls and jerkiness due to long synchronous transactions is
>> gone.
>> I can easily hook up four different USB devices (mouse, CF card
>> reader, phone, Xilinx dongle) and everything is working perfectly.
>> Mouse movements
>> are silky smooth :).
>>
>> I did some profiling with OProfile and we seems to be doing ok while
>> XP is pumping ~10 MBytes over USB (reported by one of the apps I'm
>> using). UHCI stuff is well below VNC for example.
>>
>> There is more work to be done (async control transfers for example).
>> But I think this is way better than what we have now and is ready for
>> more testing
>> by wider audience.
>> Most of the testing so far was done with KVM flavor of QEMU. I did
>> test generic i386-softmmu target a bit, it's too slow for any serious
>> testing with XP. I did full compile (all targets) too and it went fine.
>>
>
WARNING: multiple messages have this Message-ID (diff)
From: Max Krasnyansky <maxk@kernel.org>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org,
Paul Brook <paul@codesourcery.com>
Subject: [Qemu-devel] Re: [PATCH 0/8] Various USB fixes and improvements (update 2)
Date: Mon, 18 Aug 2008 11:57:52 -0700 [thread overview]
Message-ID: <48A9C630.30108@kernel.org> (raw)
In-Reply-To: <48A98102.10904@codemonkey.ws>
Anthony Liguori wrote:
> Any objections to applying this series? It seems like the consensus is
> that OHCI support is better long term but this series seems pretty sane
> and self-contained.
I'm actually having seconds thought on the OHCI vs UHCI. You probably
saw my reply to Paul. New UHCI code is fairly clean and simple, and is
working well. But I definitely think that we should fix OHCI too, and at
some point we need to add EHCI (ie USB 2.0 stuff).
I have more patches coming. I made isoc transactions work on Friday
which made MS VX-3000 USB camera totally usable (will send a patch in a
couple of hours). And I'm working on making control transactions async
too which should shave off last bits of bad latency (2-3milliseconds)
from the USB code. Initially I thought control stuff is not very
frequent but this stupid USB webcam drivers does one very often.
So yeah, it be nice if this stuff is merged soonish :).
btw If you're using git as a front end to the SVN I can push my git tree
somewhere to kernel.org so that you can just pull the whole thing.
Max
>
> Regards,
>
> Anthony Liguori
>
> Max Krasnyansky wrote:
>> This is an updated version of the USB patches I sent out yesterday.
>> It includes changes and fixes suggested by Anthony.
>>
>> This time I also did more testing with XP running on top of QEMU/KQEMU
>> (used to be QEMU/KVM).
>>
>> Max Krasnyansky (8):
>> husb: support for USB host device auto disconnect.
>> husb: support for USB host device auto connect.
>> usb: generic packet handler cleanup and documentation
>> uhci: rewrite UHCI emulator, fully async operation with multiple
>> outstanding transactions
>> husb: rewrite Linux host USB layer, fully async operation
>> husb: remove disconnect detection timer
>> husb: fixup printfs and stuff based on the review comments
>> uhci: fixes for save/load-vm
>>
>> hw/usb-uhci.c | 905
>> ++++++++++++++++++++++++++++++++++-----------------------
>> hw/usb.c | 265 +++++++++--------
>> hw/usb.h | 37 +++-
>> usb-linux.c | 645 +++++++++++++++++++++++-----------------
>> vl.c | 83 +++---
>> 5 files changed, 1138 insertions(+), 797 deletions(-)
>>
>> ----
>> Here is the original description.
>>
>> This patch series started when I tried to share USB ports between four
>> instances of Windows XP running on the same Linux box (under KVM).
>> I quickly realized that current USB support is not very flexible. We do
>> not handle devices disconnects, there is not way to assign certain USB
>> ports to VM instance, etc.
>>
>> Once I fixed that I discovered that USB devices that I absolutely need
>> in the VMs (Xilinx and Altera USB dongles) do not really work with
>> QEMU. VMs were getting stuck, applications unhappy, etc.
>> So I endded up rewriting UHCI and Linux host USB layers to make them
>> fully async and to support multiple outstanding transactions.
>>
>> The result is quite nice. We can now assign USB buses to VM instances
>> and devices are automatically connected to the VMs. Just do
>> usb_add host:N.*
>> in the console or -usbdevice command line option (N is the bus number).
>> Also when device is disconnected from the host it's automatically removed
>> from the guest.
>>
>> Host USB devices operate in fully async mode (except the control
>> transfers).
>> All the stalls and jerkiness due to long synchronous transactions is
>> gone.
>> I can easily hook up four different USB devices (mouse, CF card
>> reader, phone, Xilinx dongle) and everything is working perfectly.
>> Mouse movements
>> are silky smooth :).
>>
>> I did some profiling with OProfile and we seems to be doing ok while
>> XP is pumping ~10 MBytes over USB (reported by one of the apps I'm
>> using). UHCI stuff is well below VNC for example.
>>
>> There is more work to be done (async control transfers for example).
>> But I think this is way better than what we have now and is ready for
>> more testing
>> by wider audience.
>> Most of the testing so far was done with KVM flavor of QEMU. I did
>> test generic i386-softmmu target a bit, it's too slow for any serious
>> testing with XP. I did full compile (all targets) too and it went fine.
>>
>
next prev parent reply other threads:[~2008-08-18 18:57 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-15 0:51 [PATCH 0/8] Various USB fixes and improvements (update 2) Max Krasnyansky
2008-08-15 0:51 ` [Qemu-devel] " Max Krasnyansky
2008-08-15 0:51 ` [PATCH 1/8] husb: support for USB host device auto disconnect Max Krasnyansky
2008-08-15 0:51 ` [Qemu-devel] " Max Krasnyansky
2008-08-15 0:51 ` [PATCH 2/8] husb: support for USB host device auto connect Max Krasnyansky
2008-08-15 0:51 ` [Qemu-devel] " Max Krasnyansky
2008-08-15 0:51 ` [PATCH 3/8] usb: generic packet handler cleanup and documentation Max Krasnyansky
2008-08-15 0:51 ` [Qemu-devel] " Max Krasnyansky
2008-08-15 0:51 ` [PATCH 4/8] uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions Max Krasnyansky
2008-08-15 0:51 ` [Qemu-devel] " Max Krasnyansky
2008-08-15 0:51 ` [PATCH 5/8] husb: rewrite Linux host USB layer, fully async operation Max Krasnyansky
2008-08-15 0:51 ` [Qemu-devel] " Max Krasnyansky
2008-08-15 0:51 ` [PATCH 6/8] husb: remove disconnect detection timer Max Krasnyansky
2008-08-15 0:51 ` [Qemu-devel] " Max Krasnyansky
2008-08-15 0:51 ` [PATCH 7/8] husb: Fixup printfs and stuff based on the review comments Max Krasnyansky
2008-08-15 0:51 ` [Qemu-devel] " Max Krasnyansky
2008-08-15 0:51 ` [PATCH 8/8] uhci: fixes for save/load-vm Max Krasnyansky
2008-08-15 0:51 ` [Qemu-devel] " Max Krasnyansky
2008-08-18 14:02 ` [PATCH 0/8] Various USB fixes and improvements (update 2) Anthony Liguori
2008-08-18 14:02 ` [Qemu-devel] " Anthony Liguori
2008-08-18 14:14 ` Ian Jackson
2008-08-18 14:14 ` Ian Jackson
2008-08-18 18:57 ` Max Krasnyansky [this message]
2008-08-18 18:57 ` Max Krasnyansky
2008-08-21 18:44 ` Anthony Liguori
2008-08-21 18:44 ` [Qemu-devel] " Anthony Liguori
2008-08-21 19:36 ` Anthony Liguori
2008-08-21 19:36 ` [Qemu-devel] " Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48A9C630.30108@kernel.org \
--to=maxk@kernel.org \
--cc=anthony@codemonkey.ws \
--cc=kvm@vger.kernel.org \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.