Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933447AbdCaPmG (ORCPT ); Fri, 31 Mar 2017 11:42:06 -0400 Received: from ale.deltatee.com ([207.54.116.67]:46602 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933114AbdCaPmD (ORCPT ); Fri, 31 Mar 2017 11:42:03 -0400 To: Christoph Hellwig References: <1490911959-5146-1-git-send-email-logang@deltatee.com> <1490911959-5146-6-git-send-email-logang@deltatee.com> <20170331070950.GA9059@infradead.org> Cc: Christoph Hellwig , Sagi Grimberg , "James E.J. Bottomley" , "Martin K. Petersen" , Jens Axboe , Steve Wise , Stephen Bates , Max Gurtovoy , Dan Williams , Keith Busch , Jason Gunthorpe , linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@ml01.01.org, linux-kernel@vger.kernel.org From: Logan Gunthorpe Message-ID: <435d4471-436b-87e6-8827-c9fc6cbdde2c@deltatee.com> Date: Fri, 31 Mar 2017 09:41:56 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170331070950.GA9059@infradead.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.111 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, linux-pci@vger.kernel.org, jgunthorpe@obsidianresearch.com, keith.busch@intel.com, dan.j.williams@intel.com, maxg@mellanox.com, sbates@raithlin.com, swise@opengridcomputing.com, axboe@kernel.dk, martin.petersen@oracle.com, jejb@linux.vnet.ibm.com, sagi@grimberg.me, hch@lst.de, hch@infradead.org X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: [RFC 5/8] scatterlist: Modify SG copy functions to support io memory. X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 605 Lines: 16 On 31/03/17 01:09 AM, Christoph Hellwig wrote: > You're calling memcpy_{to,from}_iomem on non-__iomem pointers. This > is a fundamental no-go as we keep I/O memory separate from kernel > pointers. Yes, that's true, however I don't know how we could get around that when the iomem is referenced by struct pages inside a scatter gather list. Do we need to now have special __iomem sgls? And even still, I'm not sure how that could work when the nvme target code is using the same sgls to sometimes point to iomem and sometimes point to regular memory. I'm certainly open to suggestions, though. Logan