Received: from eggs.gnu.org ([2001:4830:134:3::10]:35037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDSXy-000208-Ox for qemu-devel@nongnu.org; Tue, 01 May 2018 06:30:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDSXx-0002EY-Gm for qemu-devel@nongnu.org; Tue, 01 May 2018 06:30:10 -0400 Date: Tue, 1 May 2018 11:29:59 +0100 From: Wei Liu Message-ID: <20180501102959.maktlnyz4vxmuvdq@citrix.com> References: <1525089699-13411-1-git-send-email-paul.durrant@citrix.com> <1525089699-13411-3-git-send-email-paul.durrant@citrix.com> <20180430151145.iyou5pisaclvvn3v@MacBook-Pro-de-Roger.local> <20180430152826.puhl4lzvbdpdmomj@MacBook-Pro-de-Roger.local> <8579bd8e6cbf4dd598df66a85d07e524@AMSPEX02CL03.citrite.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <8579bd8e6cbf4dd598df66a85d07e524@AMSPEX02CL03.citrite.net> Subject: Re: [Qemu-devel] [Xen-devel] [PATCH 2/4] block/xen_disk: remove use of grant map/unmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Durrant Cc: Roger Pau Monne , Kevin Wolf , Stefano Stabellini , "qemu-block@nongnu.org" , "qemu-devel@nongnu.org" , Max Reitz , Anthony Perard , "xen-devel@lists.xenproject.org" , Wei Liu On Mon, Apr 30, 2018 at 03:30:02PM +0000, Paul Durrant wrote: > > -----Original Message----- > > From: Roger Pau Monne > > Sent: 30 April 2018 16:28 > > To: Paul Durrant > > Cc: xen-devel@lists.xenproject.org; qemu-block@nongnu.org; qemu- > > devel@nongnu.org; Anthony Perard ; Kevin > > Wolf ; Stefano Stabellini ; Max > > Reitz > > Subject: Re: [Xen-devel] [PATCH 2/4] block/xen_disk: remove use of grant > > map/unmap > > > > On Mon, Apr 30, 2018 at 04:16:52PM +0100, Paul Durrant wrote: > > > > -----Original Message----- > > > > From: Roger Pau Monne > > > > Sent: 30 April 2018 16:12 > > > > To: Paul Durrant > > > > Cc: xen-devel@lists.xenproject.org; qemu-block@nongnu.org; qemu- > > > > devel@nongnu.org; Anthony Perard ; > > Kevin > > > > Wolf ; Stefano Stabellini ; > > Max > > > > Reitz > > > > Subject: Re: [Xen-devel] [PATCH 2/4] block/xen_disk: remove use of > > grant > > > > map/unmap > > > > > > > > On Mon, Apr 30, 2018 at 01:01:37PM +0100, Paul Durrant wrote: > > > > > The grant copy operation was added to libxengnttab in Xen 4.8.0. If > > grant > > > > > copy is available then data from the guest will be copied rather than > > > > > mapped. > > > > > The xen_disk source can be significantly simplified by removing this > > now > > > > > redundant code. > > > > > > > > Hm, I know this is a PITA, but FreeBSD gntdev hasn't implemented the > > > > grant-copy operation yet. > > > > > > > > I could try to implement it, but I can't make any promises on the time > > > > ATM, since I'm quite busy. > > > > > > > > > > I guess we could carry a compat patch in QEMU that implements grant copy > > by doing a map/memcpy/unmap , but QEMU feels like the wrong place for > > that. I could try putting together a similar patch for the freebsd.c component > > of libxengnttab in the xen source rather than it simply failing with ENOSYS as > > it does now. Would either of those help? > > > > Maybe this could be implemented in gnttab_core.c, so it can also be > > used by MiniOS and Linux versions not supporting the copy ioctl as a > > fallback? > > That sounds like a reasonable idea. I'll put something together so that it can go in early in 4.12. > This will not work if XSM disallows grant map but allows grant copy. Not sure how important that is. Wei. > Paul > > > > > Roger. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xenproject.org > https://lists.xenproject.org/mailman/listinfo/xen-devel