From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LW60A-00037E-9C for qemu-devel@nongnu.org; Sun, 08 Feb 2009 04:30:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LW606-000372-Qv for qemu-devel@nongnu.org; Sun, 08 Feb 2009 04:30:57 -0500 Received: from [199.232.76.173] (port=59286 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LW606-00036z-KL for qemu-devel@nongnu.org; Sun, 08 Feb 2009 04:30:54 -0500 Received: from mx2.redhat.com ([66.187.237.31]:53826) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LW606-0002Hy-6k for qemu-devel@nongnu.org; Sun, 08 Feb 2009 04:30:54 -0500 Message-ID: <498EA648.4030502@redhat.com> Date: Sun, 08 Feb 2009 11:30:48 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1233826439-16856-1-git-send-email-avi@redhat.com> <498B5962.2010202@us.ibm.com> <498BFA4D.6010107@redhat.com> <498C5377.1000202@us.ibm.com> <498DFA41.3010202@redhat.com> <498E1E45.3000307@us.ibm.com> In-Reply-To: <498E1E45.3000307@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 0/4] Block DMA helpers (v2) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org Anthony Liguori wrote: >> But I thought of something simpler: have virtio call virtio-* to >> inquire whether a ring entry terminates a request. This would also >> simplify the virtio device emulations somewhat. > > I don't know that I follow what you mean by "terminates a request". A request is composed of multiple virtio ring elements. The last ring entry for a given request terminates it. > I'm not sure I know what problem you're talking about solving. The Linux guest interface is at the request level, accepting scatter/gather lists as parameters. The qemu host interface is at the ring element level, leaving the task of gathering ring elements to make a request (and gathering segments to make a scatter/gather list) to users. I think we should make the qemu virtio host interface talk at the request level, rather than the ring entry level. If we do that, we'll get a cleaner, easier to use interface. But I think I know what you're getting at: virtio sglists contain a descriptor followed by data. We could handle that by adding qemu_sglist_sublist(QEMUSGList *sg, QEMUSGList *sublist, target_phys_addr_t offset, target_phys_addr_t len); it would involve extra copying and allocation, but we could live with it, I think. -- error compiling committee.c: too many arguments to function