From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO Date: Fri, 12 Dec 2008 21:25:58 +0100 Message-ID: <4942C8D6.5080209@redhat.com> References: <4942B841.6010900@codemonkey.ws> <20081212193743.GC30537@random.random> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , qemu-devel@nongnu.org, kvm@vger.kernel.org, avi@redhat.com, chrisw@redhat.com To: Andrea Arcangeli Return-path: Received: from mx2.redhat.com ([66.187.237.31]:43433 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751558AbYLLU0P (ORCPT ); Fri, 12 Dec 2008 15:26:15 -0500 In-Reply-To: <20081212193743.GC30537@random.random> Sender: kvm-owner@vger.kernel.org List-ID: Andrea Arcangeli wrote: > On Fri, Dec 12, 2008 at 01:15:13PM -0600, Anthony Liguori wrote: >> 1) You attempt to map a physical address. This effectively is a lock or >> pin operation. > > lock or pin for what? There's nothing to pin or lock here. Oh, there is in Xen context (i.e. qemu in dom0 handles device emulation for xen domU guests). You can ask Xen to map the grant (or guest pfn) here. I think doing so will kill the need for the mapcache patches xensource carries in the xenified qemu tree. >> 4) You unmap or unlock that memory region. The virtual address is now no >> longer valid. > > Again not needed. Likewise useful for Xen. cheers, Gerd From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBEaX-0000k8-1t for qemu-devel@nongnu.org; Fri, 12 Dec 2008 15:26:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBEaV-0000iY-FE for qemu-devel@nongnu.org; Fri, 12 Dec 2008 15:26:16 -0500 Received: from [199.232.76.173] (port=33375 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBEaV-0000iV-9I for qemu-devel@nongnu.org; Fri, 12 Dec 2008 15:26:15 -0500 Received: from mx2.redhat.com ([66.187.237.31]:38874) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LBEaU-0000zu-UQ for qemu-devel@nongnu.org; Fri, 12 Dec 2008 15:26:15 -0500 Message-ID: <4942C8D6.5080209@redhat.com> Date: Fri, 12 Dec 2008 21:25:58 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <4942B841.6010900@codemonkey.ws> <20081212193743.GC30537@random.random> In-Reply-To: <20081212193743.GC30537@random.random> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrea Arcangeli Cc: chrisw@redhat.com, avi@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org Andrea Arcangeli wrote: > On Fri, Dec 12, 2008 at 01:15:13PM -0600, Anthony Liguori wrote: >> 1) You attempt to map a physical address. This effectively is a lock or >> pin operation. > > lock or pin for what? There's nothing to pin or lock here. Oh, there is in Xen context (i.e. qemu in dom0 handles device emulation for xen domU guests). You can ask Xen to map the grant (or guest pfn) here. I think doing so will kill the need for the mapcache patches xensource carries in the xenified qemu tree. >> 4) You unmap or unlock that memory region. The virtual address is now no >> longer valid. > > Again not needed. Likewise useful for Xen. cheers, Gerd