From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757873AbdKGQDf (ORCPT ); Tue, 7 Nov 2017 11:03:35 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:57309 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757767AbdKGQDb (ORCPT ); Tue, 7 Nov 2017 11:03:31 -0500 X-Google-Smtp-Source: ABhQp+SIZYBPYxVJVTc57QS+oyrz5y66qaQ170tTAhdY+lM98n2UTGyavQSFOUg6vnJj/0KOUA79Qg== Date: Tue, 7 Nov 2017 09:03:29 -0700 From: Jason Gunthorpe To: Christoph Hellwig Cc: "Wei Hu (Xavier)" , Robin Murphy , Leon Romanovsky , shaobo.xu@intel.com, xavier.huwei@tom.com, lijun_nudt@163.com, oulijun@huawei.com, linux-rdma@vger.kernel.org, charles.chenxin@huawei.com, linuxarm@huawei.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, dledford@redhat.com, liuyixian@huawei.com, zhangxiping3@huawei.com, shaoboxu@tom.com Subject: Re: [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support in hip08 Message-ID: <20171107160329.GF21466@ziepe.ca> References: <1506763741-81429-1-git-send-email-xavier.huwei@huawei.com> <1506763741-81429-3-git-send-email-xavier.huwei@huawei.com> <20170930161023.GI2965@mtr-leonro.local> <59DF60A3.7080803@huawei.com> <5fe5f9b9-2c2b-ab3c-dafa-3e2add051bbb@arm.com> <59F97BBE.5070207@huawei.com> <5A011E49.6060407@huawei.com> <20171107154838.GC21466@ziepe.ca> <20171107155805.GA24082@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171107155805.GA24082@infradead.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 07, 2017 at 07:58:05AM -0800, Christoph Hellwig wrote: > On Tue, Nov 07, 2017 at 08:48:38AM -0700, Jason Gunthorpe wrote: > > Can't you just use vmalloc and dma_map that? Other drivers follow that > > approach.. > > You can't easily due to the flushing requirements. We used to do that > in XFS and it led to problems. You need the page allocator + vmap + > invalidate_kernel_vmap_range + flush_kernel_vmap_range to get the > cache flushing right. Yes, exactly something ugly like that.. :\ Jason