[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] uhci: Use an intermediate buffer for usb packet
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH] uhci: Use an intermediate buffer for usb packet data |
Date: |
Tue, 07 May 2013 15:36:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 |
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 usb-device as iovec, this means that the usb-device can
> write to guest-memory which the guest has already re-used for other purposes
> -> not good!
>
> This patch fixes this by adding an intermediate buffer and writing back not
> only the result, but also the data, of async completed packets when scanning
> the schedule.
Patch added to usb patch queue, pull req sent.
thanks,
Gerd