Re: [Qemu-devel] [PATCH] uhci: Use an intermediate buffer for usb packet data

2013-05-07 Thread Gerd Hoffmann
On 05/06/13 10:48, Hans de Goede wrote: Due to various unfortunate reasons we cannot reliable detect a guest cancelling a packet as soon as it happens, instead we detect cancels with some delay. When packets are handled async, and we directly pass the guest memory for the packet to the

[Qemu-devel] [PATCH] uhci: Use an intermediate buffer for usb packet data

2013-05-06 Thread Hans de Goede
Due to various unfortunate reasons we cannot reliable detect a guest cancelling a packet as soon as it happens, instead we detect cancels with some delay. When packets are handled async, and we directly pass the guest memory for the packet to the usb-device as iovec, this means that the

Re: [Qemu-devel] [PATCH] uhci: Use an intermediate buffer for usb packet data

2013-04-26 Thread Gerd Hoffmann
Hi, +if (max_len = sizeof(async-static_buf)) { +async-buf = async-static_buf; +} else { +async-buf = g_malloc(max_len); +} Do we need this? I think we should simply make the static buffer big enough for the maximum allowed packet size (isn't that big on usb

Re: [Qemu-devel] [PATCH] uhci: Use an intermediate buffer for usb packet data

2013-04-26 Thread Hans de Goede
Hi, On 04/26/2013 02:32 PM, Gerd Hoffmann wrote: Hi, +if (max_len = sizeof(async-static_buf)) { +async-buf = async-static_buf; +} else { +async-buf = g_malloc(max_len); +} Do we need this? I think we should simply make the static buffer big enough for the

[Qemu-devel] [PATCH] uhci: Use an intermediate buffer for usb packet data

2013-04-25 Thread Hans de Goede
Due to various unfortunate reasons we cannot reliable detect a guest cancelling a packet as soon as it happens, instead we detect cancels with some delay. When packets are handled async, and we directly pass the guest memory for the packet to the usb-device as iovec, this means that the