From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZi4a-0003yx-CR for qemu-devel@nongnu.org; Tue, 07 May 2013 09:36:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZi4V-0008PH-Ro for qemu-devel@nongnu.org; Tue, 07 May 2013 09:36:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZi4V-0008P9-Kz for qemu-devel@nongnu.org; Tue, 07 May 2013 09:36:47 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r47DalmO024952 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 7 May 2013 09:36:47 -0400 Message-ID: <5189036D.3030900@redhat.com> Date: Tue, 07 May 2013 15:36:45 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1367830137-9382-1-git-send-email-hdegoede@redhat.com> <1367830137-9382-2-git-send-email-hdegoede@redhat.com> In-Reply-To: <1367830137-9382-2-git-send-email-hdegoede@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] uhci: Use an intermediate buffer for usb packet data List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hans de Goede Cc: qemu-devel@nongnu.org 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