qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/1] uhci: Use an intermediate buffer for usb packet data
@ 2013-05-06  8:48 Hans de Goede
  2013-05-06  8:48 ` [Qemu-devel] [PATCH] " Hans de Goede
  0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2013-05-06  8:48 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: Hans de Goede, qemu-devel

Hi,

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.

Changes in v2: Use usb_packet_addbuf instead of directly calling iovec_add

Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-07 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-06  8:48 [Qemu-devel] [PATCH v2 0/1] uhci: Use an intermediate buffer for usb packet data Hans de Goede
2013-05-06  8:48 ` [Qemu-devel] [PATCH] " Hans de Goede
2013-05-07 13:36   ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).