From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LruKl-0007sy-Ia for qemu-devel@nongnu.org; Thu, 09 Apr 2009 09:30:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LruKh-0007qx-Sd for qemu-devel@nongnu.org; Thu, 09 Apr 2009 09:30:23 -0400 Received: from [199.232.76.173] (port=58862 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LruKh-0007qs-KX for qemu-devel@nongnu.org; Thu, 09 Apr 2009 09:30:19 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:20362) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LruKh-0007XU-0b for qemu-devel@nongnu.org; Thu, 09 Apr 2009 09:30:19 -0400 Received: from [10.80.225.184] ([10.80.225.184]) by smtp01.ad.xensource.com (8.13.1/8.13.1) with ESMTP id n39DUEuB002039 for ; Thu, 9 Apr 2009 06:30:15 -0700 Message-ID: <49DDF877.8090805@eu.citrix.com> Date: Thu, 09 Apr 2009 14:30:31 +0100 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] buffer alignment for block backends References: <49DCA80A.1020808@eu.citrix.com> <49DCF2C0.9070704@codemonkey.ws> <49DDC66F.2000404@eu.citrix.com> <49DDF3FF.8050706@codemonkey.ws> In-Reply-To: <49DDF3FF.8050706@codemonkey.ws> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" Anthony Liguori wrote: >> my backend (block-vbd) needs page aligned buffers because blkfront needs >> page aligned buffers. I could allocate a new page aligned buffer every >> time and the memcpy but it is just a waste. >> > > You'll need to check the alignment of the request and bounce it if > necessary. In the case that you have zero-copy requests coming from the > guest that aren't page aligned, someone has to bounce the thing to make > it page aligned. Yes, but that is exactly what I was trying to avoid. I can provide a bounce buffer fallback anyway (I actually should) but I would really like to avoid using it. > So I presume you're implementing blkfront in userspace? Does minios > provide a userspace interface for grant tables that looks similar to the > interfaces on Linux? Were you planning on submitting this for inclusion > in upstream QEMU? The userspace\kernelspace distinction does not make much sense in minios, but yes it provides an interface to communicate with blkback in dom0. This interface is used by block-vbd in qemu instead of block-raw-posix when run in minios. > I think it's a reasonable thing to include provided it's relatively > self-contained. > good!